Upstream version 11.39.250.0
[platform/framework/web/crosswalk.git] / src / chrome / android / java / src / org / chromium / chrome / browser / sync / ProfileSyncService.java
index d47f8e0..91e2417 100644 (file)
@@ -229,6 +229,14 @@ public class ProfileSyncService {
         return nativeHasExplicitPassphraseTime(mNativeProfileSyncServiceAndroid);
     }
 
+    /**
+     * Returns the current explicit passphrase time in milliseconds since epoch.
+     */
+    public long getExplicitPassphraseTime() {
+        assert isSyncInitialized();
+        return nativeGetExplicitPassphraseTime(mNativeProfileSyncServiceAndroid);
+    }
+
     public String getSyncEnterGooglePassphraseBodyWithDateText() {
         assert isSyncInitialized();
         return nativeGetSyncEnterGooglePassphraseBodyWithDateText(mNativeProfileSyncServiceAndroid);
@@ -301,6 +309,17 @@ public class ProfileSyncService {
     }
 
     /**
+     * Checks if encrypting all the data types is allowed.
+     *
+     * @return true if encrypting all data types is allowed, false if only passwords are allowed to
+     * be encrypted.
+     */
+    public boolean isEncryptEverythingAllowed() {
+        assert isSyncInitialized();
+        return nativeIsEncryptEverythingAllowed(mNativeProfileSyncServiceAndroid);
+    }
+
+    /**
      * Checks if the all the data types are encrypted.
      *
      * @return true if all data types are encrypted, false if only passwords are encrypted.
@@ -560,6 +579,7 @@ public class ProfileSyncService {
     private native int nativeGetAuthError(long nativeProfileSyncServiceAndroid);
     private native boolean nativeIsSyncInitialized(long nativeProfileSyncServiceAndroid);
     private native boolean nativeIsFirstSetupInProgress(long nativeProfileSyncServiceAndroid);
+    private native boolean nativeIsEncryptEverythingAllowed(long nativeProfileSyncServiceAndroid);
     private native boolean nativeIsEncryptEverythingEnabled(long nativeProfileSyncServiceAndroid);
     private native void nativeEnableEncryptEverything(long nativeProfileSyncServiceAndroid);
     private native boolean nativeIsPassphraseRequiredForDecryption(
@@ -574,6 +594,7 @@ public class ProfileSyncService {
     private native boolean nativeIsCryptographerReady(long nativeProfileSyncServiceAndroid);
     private native int nativeGetPassphraseType(long nativeProfileSyncServiceAndroid);
     private native boolean nativeHasExplicitPassphraseTime(long nativeProfileSyncServiceAndroid);
+    private native long nativeGetExplicitPassphraseTime(long nativeProfileSyncServiceAndroid);
     private native String nativeGetSyncEnterGooglePassphraseBodyWithDateText(
             long nativeProfileSyncServiceAndroid);
     private native String nativeGetSyncEnterCustomPassphraseBodyWithDateText(