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

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: Comments 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 a9c73bc86b9d1f3f6e58c1b191b7cebfa849cd0a..c2ffb4a1dbdc5052a75a2c456d8a57ef08606ae7 100644
--- a/components/password_manager/core/browser/password_manager_client.h
+++ b/components/password_manager/core/browser/password_manager_client.h
@@ -18,6 +18,11 @@ class PasswordFormManager;
class PasswordManagerDriver;
class PasswordStore;
+enum CustomPassphraseState {
+ WITHOUT_CUSTOM_PASSPHRASE,
+ ONLY_CUSTOM_PASSPHRASE
+};
+
// An abstraction of operations that depend on the embedders (e.g. Chrome)
// environment.
class PasswordManagerClient {
@@ -39,6 +44,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(
@@ -88,9 +97,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