Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(464)

Unified Diff: components/password_manager/core/browser/password_manager_client.h

Issue 644053003: [Password Manager] Add UMA stats for custom passphrase users. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698