Chromium Code Reviews| Index: chrome/browser/password_manager/sync_metrics.cc |
| diff --git a/chrome/browser/password_manager/sync_metrics.cc b/chrome/browser/password_manager/sync_metrics.cc |
| index 4eddf427ccd22db327b2fa421aaee66bd509056d..bf4bf95d14f00c9eb071a31422024f51b7206f32 100644 |
| --- a/chrome/browser/password_manager/sync_metrics.cc |
| +++ b/chrome/browser/password_manager/sync_metrics.cc |
| @@ -14,8 +14,19 @@ |
| namespace password_manager_sync_metrics { |
| std::string GetSyncUsername(Profile* profile) { |
| + // If sync is setup, return early if we aren't syncing passwords. |
|
Ilya Sherman
2014/08/12 02:17:33
nit: "setup" -> "set up"
Garrett Casto
2014/08/13 20:34:41
Done.
|
| + if (ProfileSyncServiceFactory::HasProfileSyncService(profile)) { |
| + ProfileSyncService* sync_service = |
| + ProfileSyncServiceFactory::GetForProfile(profile); |
| + if (!sync_service || |
|
Ilya Sherman
2014/08/12 02:17:33
Why might the sync_service be null, if HasProfileS
Garrett Casto
2014/08/13 20:34:40
That's true. I just reverted the previous change t
|
| + !sync_service->HasSyncSetupCompleted() || |
|
Ilya Sherman
2014/08/12 02:17:33
Are we not syncing the sync password if sync setup
Garrett Casto
2014/08/13 20:34:40
The issue is that we can't tell if we are syncing
Ilya Sherman
2014/08/13 20:48:14
I guess it just seems like it would be better to b
Garrett Casto
2014/08/13 23:12:54
From a privacy standpoint I don't think that it re
Ilya Sherman
2014/08/14 07:38:14
Joel, ^^^
jww
2014/08/14 21:50:20
Whoops, sorry I missed it. I agree with Garrett. I
|
| + !sync_service->GetActiveDataTypes().Has(syncer::PASSWORDS)) |
| + return ""; |
|
Ilya Sherman
2014/08/12 02:17:33
nit: Prefer std::string() to "".
Garrett Casto
2014/08/13 20:34:41
Done.
|
| + } |
| + |
| SigninManagerBase* signin_manager = |
| SigninManagerFactory::GetForProfile(profile); |
| + |
| if (!signin_manager) |
| return ""; |