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

Unified Diff: chrome/browser/ui/passwords/password_bubble_experiment.cc

Issue 1134343002: [Password Manager] Fix IsEnabledSmartLockBranding (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@400674_486739_return_values_IsPasswordSyncEnabled
Patch Set: Created 5 years, 7 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: chrome/browser/ui/passwords/password_bubble_experiment.cc
diff --git a/chrome/browser/ui/passwords/password_bubble_experiment.cc b/chrome/browser/ui/passwords/password_bubble_experiment.cc
index a64bd5778a8f4cbafa1efc1889b7c59c6359d802..ec977b1b5fcd3a18b08889a9c0c3766bc84605b3 100644
--- a/chrome/browser/ui/passwords/password_bubble_experiment.cc
+++ b/chrome/browser/ui/passwords/password_bubble_experiment.cc
@@ -5,8 +5,10 @@
#include "chrome/browser/ui/passwords/password_bubble_experiment.h"
#include "base/metrics/field_trial.h"
+#include "chrome/browser/password_manager/password_manager_util.h"
#include "chrome/browser/signin/signin_manager_factory.h"
-#include "components/signin/core/browser/signin_manager.h"
+#include "chrome/browser/sync/profile_sync_service.h"
engedy 2015/05/13 14:41:20 nit: I think this include is not needed. The facto
vabr (Chromium) 2015/05/13 14:55:06 Done. But not in the client -- the factory only fo
engedy 2015/05/13 14:57:33 Yeah, I only meant removing the include here.
+#include "chrome/browser/sync/profile_sync_service_factory.h"
namespace password_bubble_experiment {
namespace {
@@ -23,8 +25,9 @@ void RecordBubbleClosed(
}
bool IsEnabledSmartLockBranding(Profile* profile) {
- SigninManagerBase* signin = SigninManagerFactory::GetForProfile(profile);
- return (signin && signin->IsAuthenticated() &&
+ const ProfileSyncService* sync_service =
+ ProfileSyncServiceFactory::GetForProfile(profile);
+ return (password_manager_util::GetPasswordSyncState(sync_service) &&
engedy 2015/05/13 14:41:20 nit: Are these enclossing parens needed for clang-
vabr (Chromium) 2015/05/13 14:55:06 Done.
base::FieldTrialList::FindFullName(kBrandingExperimentName) ==
kSmartLockBrandingGroupName);
}

Powered by Google App Engine
This is Rietveld 408576698