Commit a68bc5fc authored by joaodasilva's avatar joaodasilva Committed by Commit bot

Added isSyncingUrlsWithKeystorePassphrase.

This determines if sync is initialized and syncing URLs with the
appropriate keystore passphrase type to support contextual searches.

BUG=460786

Review URL: https://codereview.chromium.org/946273002

Cr-Commit-Position: refs/heads/master@{#317610}
parent fc3f8c65
......@@ -542,6 +542,15 @@ public class ProfileSyncService {
return sb.toString();
}
/**
* @return Whether sync is enabled to sync urls or open tabs with a non custom passphrase.
*/
public boolean isSyncingUrlsWithKeystorePassphrase() {
return isSyncInitialized()
&& getPreferredDataTypes().contains(ModelType.TYPED_URL)
&& getPassphraseType().equals(PassphraseType.KEYSTORE_PASSPHRASE);
}
// Native methods
private native long nativeInit();
private native void nativeEnableSync(long nativeProfileSyncServiceAndroid);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment