Index: components/password_manager/core/browser/password_store.h |
diff --git a/components/password_manager/core/browser/password_store.h b/components/password_manager/core/browser/password_store.h |
index 6520f34da4b87a7e315adb20d1210ca65f10b0a4..97e4bd6fc3e1ba811c56ff9d821846113324f7ab 100644 |
--- a/components/password_manager/core/browser/password_store.h |
+++ b/components/password_manager/core/browser/password_store.h |
@@ -17,6 +17,7 @@ |
#include "base/time/time.h" |
#include "components/password_manager/core/browser/password_store_change.h" |
#include "components/password_manager/core/browser/password_store_sync.h" |
+#include "components/password_manager/core/common/sync_state.h" |
#include "sync/api/syncable_service.h" |
class Task; |
@@ -127,7 +128,10 @@ class PasswordStore : protected PasswordStoreSync, |
scoped_refptr<base::SingleThreadTaskRunner> db_thread_runner); |
// Reimplement this to add custom initialization. Always call this too. |
- virtual bool Init(const syncer::SyncableService::StartSyncFlare& flare); |
+ // |sync_username| and |sync_state| are specified to aid in metrics reporting. |
+ virtual bool Init(const syncer::SyncableService::StartSyncFlare& flare, |
+ const std::string& sync_username, |
+ enum SyncState sync_state); |
// Adds the given PasswordForm to the secure password store asynchronously. |
virtual void AddLogin(const autofill::PasswordForm& form); |
@@ -169,7 +173,8 @@ class PasswordStore : protected PasswordStoreSync, |
virtual void GetBlacklistLogins(PasswordStoreConsumer* consumer); |
// Reports usage metrics for the database. |
- virtual void ReportMetrics(); |
+ virtual void ReportMetrics(const std::string& sync_username, |
+ enum SyncState sync_state); |
// Adds an observer to be notified when the password store data changes. |
void AddObserver(Observer* observer); |
@@ -203,7 +208,8 @@ class PasswordStore : protected PasswordStoreSync, |
// Methods below will be run in PasswordStore's own thread. |
// Synchronous implementation that reports usage metrics. |
- virtual void ReportMetricsImpl() = 0; |
+ virtual void ReportMetricsImpl(const std::string& sync_username, |
+ enum SyncState sync_state) = 0; |
// Bring PasswordStoreSync methods to the scope of PasswordStore. Otherwise, |
// base::Bind can't be used with them because it fails to cast PasswordStore |