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

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: Comments addressed 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
« no previous file with comments | « chrome/browser/password_manager/password_manager_util.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..4402e801f685778c8e7d0651eb232e80c5c152b3 100644
--- a/chrome/browser/ui/passwords/password_bubble_experiment.cc
+++ b/chrome/browser/ui/passwords/password_bubble_experiment.cc
@@ -5,8 +5,9 @@
#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_factory.h"
namespace password_bubble_experiment {
namespace {
@@ -23,10 +24,11 @@ void RecordBubbleClosed(
}
bool IsEnabledSmartLockBranding(Profile* profile) {
- SigninManagerBase* signin = SigninManagerFactory::GetForProfile(profile);
- return (signin && signin->IsAuthenticated() &&
- base::FieldTrialList::FindFullName(kBrandingExperimentName) ==
- kSmartLockBrandingGroupName);
+ const ProfileSyncService* sync_service =
+ ProfileSyncServiceFactory::GetForProfile(profile);
+ return password_manager_util::GetPasswordSyncState(sync_service) &&
+ base::FieldTrialList::FindFullName(kBrandingExperimentName) ==
+ kSmartLockBrandingGroupName;
}
« no previous file with comments | « chrome/browser/password_manager/password_manager_util.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698