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

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

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_view_utils.h
diff --git a/chrome/browser/ui/passwords/manage_passwords_view_utils.h b/chrome/browser/ui/passwords/manage_passwords_view_utils.h
index 89757ca386d01ccab9a22d215f8b4982001c9310..7350e253e7f183a4ee3e32f9bb3d904aab9a75d3 100644
--- a/chrome/browser/ui/passwords/manage_passwords_view_utils.h
+++ b/chrome/browser/ui/passwords/manage_passwords_view_utils.h
@@ -5,13 +5,35 @@
#ifndef CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_VIEW_UTILS_H_
#define CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_VIEW_UTILS_H_
+#include "base/strings/string16.h"
+
namespace gfx {
class ImageSkia;
+class Range;
} // namespace gfx
+class GURL;
+
// The desired width and height in pixels for an account avatar.
extern const int kAvatarImageSize;
// Crops and scales |image_skia| to the desired size for an account avatar.
gfx::ImageSkia ScaleImageForAccountAvatar(gfx::ImageSkia image_skia);
+
+// Sets the formatted |title| in the Save Password bubble. If the registry
+// controlled domain of |user_visible_url| (i.e. the one seen in the omnibox)
+// differs from the registry controlled domain of |form_origin_url|, sets
+// |IDS_SAVE_PASSWORD_TITLE| as the |title| so that it replaces "this site" in
+// title text with output of |FormatUrlForSecurityDisplay(form_origin_url)|.
+// Otherwise, sets |IDS_SAVE_PASSWORD| as the |title| having "this site".
+// If |is_smartlock_branding_enabled| is true, sets the |title_link_range| for
+// the "Google Smart Lock" text range to be set visibly as a hyperlink in the
+// dialog bubble.
+void GetSavePasswordDialogTitleTextAndLinkRange(
+ const GURL& user_visible_url,
+ const GURL& form_origin_url,
+ bool is_smartlock_branding_enabled,
+ base::string16* title,
+ gfx::Range* title_link_range);
+
#endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_VIEW_UTILS_H_

Powered by Google App Engine
This is Rietveld 408576698