| 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..5f70314a0be2f82c6c503a88288d1d253ee67954 100644
|
| --- a/chrome/browser/ui/passwords/manage_passwords_view_utils.h
|
| +++ b/chrome/browser/ui/passwords/manage_passwords_view_utils.h
|
| @@ -5,13 +5,44 @@
|
| #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 content {
|
| +class WebContents;
|
| +} // namespace content
|
| +
|
| 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);
|
| +
|
| +// This function sets formatted |tilte| in the "Save Password" dialog bubble. If
|
| +// the hostname of |web_contents|'s visible URL differs from the hostname of
|
| +// |form_origin|, sets resource string |IDS_SAVE_PASSWORD_TITLE| as the |title|
|
| +// containing |form_origin|'s url with formatting that:
|
| +//
|
| +// - omits the path for standard schemes, excepting file and filesystem,
|
| +// - omits the port if it is the default for the scheme,
|
| +// - elides the standard schemes if scheme of |web_contents|'s visible URL
|
| +// differs from the scheme of |form_origin|, excepting file and filesystem;
|
| +//
|
| +// otherwise sets resource string |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 to be set as a hyperlink
|
| +// in the dialog bubble.
|
| +void GetSavePasswordTitleTextAndLinkRange(
|
| + const content::WebContents* web_contents,
|
| + const GURL& form_origin,
|
| + bool is_smartlock_branding_enabled,
|
| + base::string16* title,
|
| + gfx::Range* title_link_range);
|
| +
|
| #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_VIEW_UTILS_H_
|
|
|