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

Unified Diff: chrome/browser/ui/passwords/manage_passwords_bubble_model.cc

Issue 1181623004: [Password Manager] Replace "this site" in save password prompt with password's origin. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix for Windows bot. Created 5 years, 5 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/passwords/manage_passwords_bubble_model.cc
diff --git a/chrome/browser/ui/passwords/manage_passwords_bubble_model.cc b/chrome/browser/ui/passwords/manage_passwords_bubble_model.cc
index af537be63d2e730cf5bcdfe686090f0b2a2c9a90..1a0199834985e3ce2b34d6163b553174cb36daef 100644
--- a/chrome/browser/ui/passwords/manage_passwords_bubble_model.cc
+++ b/chrome/browser/ui/passwords/manage_passwords_bubble_model.cc
@@ -14,6 +14,7 @@
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/passwords/manage_passwords_ui_controller.h"
+#include "chrome/browser/ui/passwords/manage_passwords_view_utils.h"
#include "chrome/common/url_constants.h"
#include "chrome/grit/chromium_strings.h"
#include "chrome/grit/generated_resources.h"
@@ -338,16 +339,10 @@ void ManagePasswordsBubbleModel::UpdatePendingStateTitle() {
if (never_save_passwords_) {
title_ = l10n_util::GetStringUTF16(
IDS_MANAGE_PASSWORDS_BLACKLIST_CONFIRMATION_TITLE);
- } else if (IsSmartLockBrandingEnabled(GetProfile())) {
- // "Google Smart Lock" should be a hyperlink.
- base::string16 brand_link =
- l10n_util::GetStringUTF16(IDS_PASSWORD_MANAGER_SMART_LOCK);
- size_t offset = 0;
- title_ = l10n_util::GetStringFUTF16(IDS_SAVE_PASSWORD, brand_link, &offset);
- title_brand_link_range_ = gfx::Range(offset, offset + brand_link.length());
} else {
- base::string16 brand_link =
- l10n_util::GetStringUTF16(IDS_SAVE_PASSWORD_TITLE_BRAND);
- title_ = l10n_util::GetStringFUTF16(IDS_SAVE_PASSWORD, brand_link);
+ GetSavePasswordDialogTitleTextAndLinkRange(
+ web_contents()->GetVisibleURL(), origin(),
+ IsSmartLockBrandingEnabled(GetProfile()), &title_,
+ &title_brand_link_range_);
}
}

Powered by Google App Engine
This is Rietveld 408576698