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

Unified Diff: chrome/browser/password_manager/save_password_infobar_delegate.cc

Issue 1141413002: Prepare password_bubble_experiment and password_manager_util for componentisation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Android 2 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/password_manager/save_password_infobar_delegate.cc
diff --git a/chrome/browser/password_manager/save_password_infobar_delegate.cc b/chrome/browser/password_manager/save_password_infobar_delegate.cc
index 299b246f82896e0b9e7ebc470f0db9cfa7c4825e..9e020a1289d42eeb992206ce5ae2e18fbfadd8de 100644
--- a/chrome/browser/password_manager/save_password_infobar_delegate.cc
+++ b/chrome/browser/password_manager/save_password_infobar_delegate.cc
@@ -7,6 +7,8 @@
#include "base/metrics/histogram.h"
#include "chrome/browser/infobars/infobar_service.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/sync/profile_sync_service.h"
+#include "chrome/browser/sync/profile_sync_service_factory.h"
#include "chrome/browser/ui/passwords/password_bubble_experiment.h"
#include "chrome/grit/chromium_strings.h"
#include "chrome/grit/generated_resources.h"
@@ -41,10 +43,12 @@ void SavePasswordInfoBarDelegate::Create(
InfoBarService::FromWebContents(web_contents);
Profile* profile =
Profile::FromBrowserContext(web_contents->GetBrowserContext());
+ const ProfileSyncService* sync_service =
+ ProfileSyncServiceFactory::GetForProfile(profile);
SavePasswordInfoBarDelegate* infobar_delegate =
new SavePasswordInfoBarDelegate(
form_to_save.Pass(), uma_histogram_suffix, source_type,
- password_bubble_experiment::IsSmartLockBrandingEnabled(profile));
+ password_bubble_experiment::IsSmartLockBrandingEnabled(sync_service));
#if defined(OS_ANDROID)
// For Android in case of smart lock we need different appearance of infobar.
scoped_ptr<infobars::InfoBar> infobar =

Powered by Google App Engine
This is Rietveld 408576698