Index: components/password_manager/core/browser/password_manager_client.h |
diff --git a/components/password_manager/core/browser/password_manager_client.h b/components/password_manager/core/browser/password_manager_client.h |
index 2c49288d85942c13421fbd4db10c2c31191eb3ed..8d5ce2801841537a025618ebe49ff7463706b340 100644 |
--- a/components/password_manager/core/browser/password_manager_client.h |
+++ b/components/password_manager/core/browser/password_manager_client.h |
@@ -19,6 +19,11 @@ class PasswordFormManager; |
class PasswordManagerDriver; |
class PasswordStore; |
+enum CustomPassphraseState { |
+ EXCLUDE_CUSTOM_PASSPHRASE_USERS, |
vabr (Chromium)
2014/10/13 09:24:18
What about renaming those to "WITHOUT_CUSTOM_PASSP
Garrett Casto
2014/10/13 20:57:56
WITH_CUSTOM_PASSPHRASE sounds like it's inclusive
vabr (Chromium)
2014/10/14 07:32:51
Good point with WITH_CUSTOM_PASSPHRASE sounding li
|
+ ONLY_CUSTOM_PASSPHRASE_USERS |
+}; |
+ |
// An abstraction of operations that depend on the embedders (e.g. Chrome) |
// environment. |
class PasswordManagerClient { |
@@ -40,6 +45,10 @@ class PasswordManagerClient { |
virtual bool ShouldFilterAutofillResult( |
const autofill::PasswordForm& form) = 0; |
+ // Return the username that the user is syncing with. Should return an empty |
+ // string if sync is not enabled for passwords. |
+ virtual std::string GetSyncUsername() const = 0; |
+ |
// Returns true if |username| and |origin| correspond to the account which is |
// syncing. |
virtual bool IsSyncAccountCredential( |
@@ -94,9 +103,10 @@ class PasswordManagerClient { |
virtual base::FieldTrial::Probability GetProbabilityForExperiment( |
const std::string& experiment_name); |
- // Returns true if password sync is enabled in the embedder. The default |
- // implementation returns false. |
- virtual bool IsPasswordSyncEnabled(); |
+ // Returns true if password sync is enabled in the embedder. Return value for |
+ // custom passphrase users depends on |state|. The default implementation |
+ // always returns false. |
+ virtual bool IsPasswordSyncEnabled(CustomPassphraseState state); |
// Only for clients which registered with a LogRouter: If called with |
// |router_can_be_used| set to false, the client may no longer use the |