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

Unified Diff: chrome/browser/ui/autofill/password_generation_popup_controller_impl.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/ui/autofill/password_generation_popup_controller_impl.cc
diff --git a/chrome/browser/ui/autofill/password_generation_popup_controller_impl.cc b/chrome/browser/ui/autofill/password_generation_popup_controller_impl.cc
index 5ee343e6c65441c0083a2153b5131156ac10646e..9691aeaf45012eafc9406941d8c5c5aaf7eeab0f 100644
--- a/chrome/browser/ui/autofill/password_generation_popup_controller_impl.cc
+++ b/chrome/browser/ui/autofill/password_generation_popup_controller_impl.cc
@@ -12,6 +12,8 @@
#include "base/strings/utf_string_conversion_utils.h"
#include "base/strings/utf_string_conversions.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/autofill/password_generation_popup_observer.h"
#include "chrome/browser/ui/autofill/password_generation_popup_view.h"
#include "chrome/browser/ui/autofill/popup_constants.h"
@@ -91,8 +93,10 @@ PasswordGenerationPopupControllerImpl::PasswordGenerationPopupControllerImpl(
int link_id = IDS_MANAGE_PASSWORDS_LINK;
int help_text_id = IDS_PASSWORD_GENERATION_PROMPT;
- if (password_bubble_experiment::IsSmartLockBrandingEnabled(
- Profile::FromBrowserContext(web_contents->GetBrowserContext()))) {
+ const ProfileSyncService* sync_service =
+ ProfileSyncServiceFactory::GetForProfile(
+ Profile::FromBrowserContext(web_contents->GetBrowserContext()));
+ if (password_bubble_experiment::IsSmartLockBrandingEnabled(sync_service)) {
help_text_id = IDS_PASSWORD_GENERATION_SMART_LOCK_PROMPT;
link_id = IDS_PASSWORD_MANAGER_SMART_LOCK_FOR_PASSWORDS;
}

Powered by Google App Engine
This is Rietveld 408576698