| 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 b42ad6bb0af7d9aa78b4c79f7aae659a50df9358..a9aba0633de5f0071d408406e2a83f3d8a571771 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/string_util.h"
|
| #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_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"
|
| @@ -23,6 +25,7 @@
|
| #include "chrome/grit/generated_resources.h"
|
| #include "components/autofill/core/browser/password_generator.h"
|
| #include "components/autofill/core/browser/suggestion.h"
|
| +#include "components/browser_sync/profile_sync_service.h"
|
| #include "components/password_manager/core/browser/password_bubble_experiment.h"
|
| #include "components/password_manager/core/browser/password_manager.h"
|
| #include "content/public/browser/native_web_keyboard_event.h"
|
| @@ -94,10 +97,19 @@ PasswordGenerationPopupControllerImpl::PasswordGenerationPopupControllerImpl(
|
| base::Bind(&PasswordGenerationPopupControllerImpl::HandleKeyPressEvent,
|
| base::Unretained(this)));
|
|
|
| - base::string16 link = l10n_util::GetStringUTF16(IDS_MANAGE_PASSWORDS_LINK);
|
| - size_t offset = 0;
|
| - help_text_ =
|
| - l10n_util::GetStringFUTF16(IDS_PASSWORD_GENERATION_PROMPT, link, &offset);
|
| + int link_id = IDS_MANAGE_PASSWORDS_LINK;
|
| + int help_text_id = IDS_PASSWORD_GENERATION_PROMPT;
|
| + const browser_sync::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;
|
| + }
|
| +
|
| + base::string16 link = l10n_util::GetStringUTF16(link_id);
|
| + size_t offset;
|
| + help_text_ = l10n_util::GetStringFUTF16(help_text_id, link, &offset);
|
| link_range_ = gfx::Range(offset, offset + link.length());
|
| }
|
|
|
|
|