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

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

Issue 1776883004: Change the title of the password bubble for Android credentials. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2661
Patch Set: Created 4 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/ui/passwords/manage_passwords_view_utils_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/passwords/manage_passwords_view_utils.cc
diff --git a/chrome/browser/ui/passwords/manage_passwords_view_utils.cc b/chrome/browser/ui/passwords/manage_passwords_view_utils.cc
index 338dd3e2fabe55da821d01ba0f72017c70e26955..274d75439eda57a4ac5523abbdb66a532fbb4dd9 100644
--- a/chrome/browser/ui/passwords/manage_passwords_view_utils.cc
+++ b/chrome/browser/ui/passwords/manage_passwords_view_utils.cc
@@ -96,7 +96,14 @@ void GetSavePasswordDialogTitleTextAndLinkRange(
// Check whether the registry controlled domains for user-visible URL (i.e.
// the one seen in the omnibox) and the password form post-submit navigation
// URL differs or not.
- if (!SameDomainOrHost(user_visible_url, form_origin_url)) {
+ password_manager::FacetURI facet_uri =
+ password_manager::FacetURI::FromPotentiallyInvalidSpec(
+ form_origin_url.spec());
+ if (facet_uri.IsValidAndroidFacetURI()) {
+ title_id = IDS_SAVE_PASSWORD_TITLE;
+ replacements.push_back(
+ base::ASCIIToUTF16(GetHumanReadableOriginForAndroidUri(facet_uri)));
+ } else if (!SameDomainOrHost(user_visible_url, form_origin_url)) {
title_id = IDS_SAVE_PASSWORD_TITLE;
// TODO(palmer): Look into passing real language prefs here, not "".
// crbug.com/498069.
@@ -126,7 +133,14 @@ void GetManagePasswordsDialogTitleText(const GURL& user_visible_url,
// Check whether the registry controlled domains for user-visible URL
// (i.e. the one seen in the omnibox) and the managed password origin URL
// differ or not.
- if (!SameDomainOrHost(user_visible_url, password_origin_url)) {
+ password_manager::FacetURI facet_uri =
+ password_manager::FacetURI::FromPotentiallyInvalidSpec(
+ password_origin_url.spec());
+ if (facet_uri.IsValidAndroidFacetURI()) {
+ *title = l10n_util::GetStringFUTF16(
+ IDS_MANAGE_PASSWORDS_TITLE_DIFFERENT_DOMAIN,
+ base::ASCIIToUTF16(GetHumanReadableOriginForAndroidUri(facet_uri)));
+ } else if (!SameDomainOrHost(user_visible_url, password_origin_url)) {
// TODO(palmer): Look into passing real language prefs here, not "".
base::string16 formatted_url = url_formatter::FormatUrlForSecurityDisplay(
password_origin_url, std::string());
« no previous file with comments | « no previous file | chrome/browser/ui/passwords/manage_passwords_view_utils_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698