Chromium Code Reviews| Index: chrome/browser/password_manager/generated_password_saved_infobar_delegate_android.cc |
| diff --git a/chrome/browser/password_manager/generated_password_saved_infobar_delegate_android.cc b/chrome/browser/password_manager/generated_password_saved_infobar_delegate_android.cc |
| index 59ec915ea3f2159feae94a183de4ac6912df58f2..3d0c6149b4dd0ab45e892f0cf5d081aa27553dcf 100644 |
| --- a/chrome/browser/password_manager/generated_password_saved_infobar_delegate_android.cc |
| +++ b/chrome/browser/password_manager/generated_password_saved_infobar_delegate_android.cc |
| @@ -8,56 +8,28 @@ |
| #include "base/strings/utf_string_conversions.h" |
| #include "chrome/browser/android/chrome_application.h" |
| -#include "chrome/browser/infobars/infobar_service.h" |
| -#include "chrome/browser/profiles/profile.h" |
| -#include "chrome/browser/sync/profile_sync_service_factory.h" |
| #include "chrome/grit/generated_resources.h" |
| #include "chrome/grit/theme_resources.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_constants.h" |
| #include "components/strings/grit/components_strings.h" |
| -#include "content/public/browser/web_contents.h" |
| #include "ui/base/l10n/l10n_util.h" |
| GeneratedPasswordSavedInfoBarDelegateAndroid:: |
| ~GeneratedPasswordSavedInfoBarDelegateAndroid() {} |
| void GeneratedPasswordSavedInfoBarDelegateAndroid::OnInlineLinkClicked() { |
| - if (smart_lock_branding_enabled_) { |
| - InfoBarService::WebContentsFromInfoBar(infobar())->OpenURL( |
| - content::OpenURLParams( |
| - GURL(password_manager::kPasswordManagerAccountDashboardURL), |
| - content::Referrer(), WindowOpenDisposition::NEW_FOREGROUND_TAB, |
| - ui::PAGE_TRANSITION_LINK, false)); |
| - } else { |
| - chrome::android::ChromeApplication::ShowPasswordSettings(); |
| - } |
| + chrome::android::ChromeApplication::ShowPasswordSettings(); |
| } |
| GeneratedPasswordSavedInfoBarDelegateAndroid:: |
| - GeneratedPasswordSavedInfoBarDelegateAndroid( |
| - content::WebContents *web_contents) |
| - : button_label_(l10n_util::GetStringUTF16(IDS_OK)), |
| - web_contents_(web_contents), |
| - smart_lock_branding_enabled_( |
| - password_bubble_experiment::IsSmartLockBrandingEnabled( |
| - ProfileSyncServiceFactory::GetForProfile( |
| - Profile::FromBrowserContext( |
| - web_contents->GetBrowserContext())))) { |
| - base::string16 link = l10n_util::GetStringUTF16( |
| - IDS_MANAGE_PASSWORDS_LINK); |
| - int confirmation_id = IDS_MANAGE_PASSWORDS_CONFIRM_GENERATED_TEXT_INFOBAR; |
| - if (smart_lock_branding_enabled_) { |
| - std::string management_hostname = |
| - GURL(password_manager::kPasswordManagerAccountDashboardURL).host(); |
| - link = base::UTF8ToUTF16(management_hostname); |
| - confirmation_id = |
| - IDS_MANAGE_PASSWORDS_CONFIRM_GENERATED_SMART_LOCK_TEXT_INFOBAR; |
| - } |
| + GeneratedPasswordSavedInfoBarDelegateAndroid() |
| + : button_label_(l10n_util::GetStringUTF16(IDS_OK)) { |
| + base::string16 link = l10n_util::GetStringUTF16(IDS_MANAGE_PASSWORDS_LINK); |
| size_t offset; |
|
vasilii
2016/12/16 16:56:53
= 0;
vabr (Chromium)
2016/12/16 18:56:28
Done.
|
| - message_text_ = l10n_util::GetStringFUTF16(confirmation_id, link, &offset); |
| + message_text_ = l10n_util::GetStringFUTF16( |
| + IDS_MANAGE_PASSWORDS_CONFIRM_GENERATED_TEXT_INFOBAR, link, &offset); |
| inline_link_range_ = gfx::Range(offset, offset + link.length()); |
| } |