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

Side by Side Diff: chrome/browser/ui/passwords/manage_passwords_view_utils.h

Issue 1837043003: Add a title for the account chooser for one credential displayed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_VIEW_UTILS_H_ 5 #ifndef CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_VIEW_UTILS_H_
6 #define CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_VIEW_UTILS_H_ 6 #define CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_VIEW_UTILS_H_
7 7
8 #include "base/strings/string16.h" 8 #include "base/strings/string16.h"
9 9
10 namespace autofill { 10 namespace autofill {
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 const GURL& password_origin_url, 67 const GURL& password_origin_url,
68 base::string16* title); 68 base::string16* title);
69 69
70 // Sets the formatted |title| in the Account Chooser UI. 70 // Sets the formatted |title| in the Account Chooser UI.
71 // If |is_smartlock_branding_enabled| is true, sets the |title_link_range| for 71 // If |is_smartlock_branding_enabled| is true, sets the |title_link_range| for
72 // the "Google Smart Lock" text range to be set visibly as a hyperlink in the 72 // the "Google Smart Lock" text range to be set visibly as a hyperlink in the
73 // dialog bubble otherwise chooses the title which doesn't contain Smart Lock 73 // dialog bubble otherwise chooses the title which doesn't contain Smart Lock
74 // branding. 74 // branding.
75 void GetAccountChooserDialogTitleTextAndLinkRange( 75 void GetAccountChooserDialogTitleTextAndLinkRange(
76 bool is_smartlock_branding_enabled, 76 bool is_smartlock_branding_enabled,
77 bool many_accounts,
77 base::string16* title, 78 base::string16* title,
78 gfx::Range* title_link_range); 79 gfx::Range* title_link_range);
79 80
80 // Loads |smartlock_string_id| or |default_string_id| string from the resources 81 // Loads |smartlock_string_id| or |default_string_id| string from the resources
81 // and substitutes the placeholder with the correct password manager branding 82 // and substitutes the placeholder with the correct password manager branding
82 // (Google Smart Lock, Google Chrome or Chromium) according to 83 // (Google Smart Lock, Google Chrome or Chromium) according to
83 // |is_smartlock_branding_enabled|. If |is_smartlock_branding_enabled| is true 84 // |is_smartlock_branding_enabled|. If |is_smartlock_branding_enabled| is true
84 // then |link_range| contains the link range for the brand name. 85 // then |link_range| contains the link range for the brand name.
85 void GetBrandedTextAndLinkRange( 86 void GetBrandedTextAndLinkRange(
86 bool is_smartlock_branding_enabled, 87 bool is_smartlock_branding_enabled,
87 int smartlock_string_id, 88 int smartlock_string_id,
88 int default_string_id, 89 int default_string_id,
89 base::string16* out_string, 90 base::string16* out_string,
90 gfx::Range* link_range); 91 gfx::Range* link_range);
91 92
92 // Returns an username in the form that should be shown in the bubble. 93 // Returns an username in the form that should be shown in the bubble.
93 base::string16 GetDisplayUsername(const autofill::PasswordForm& form); 94 base::string16 GetDisplayUsername(const autofill::PasswordForm& form);
94 95
95 // Check if |profile| syncing the Auto sign-in settings (by checking that user 96 // Check if |profile| syncing the Auto sign-in settings (by checking that user
96 // syncs the PRIORITY_PREFERENCE). The view appearance might depend on it. 97 // syncs the PRIORITY_PREFERENCE). The view appearance might depend on it.
97 bool IsSyncingAutosignSetting(Profile* profile); 98 bool IsSyncingAutosignSetting(Profile* profile);
98 99
99 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_VIEW_UTILS_H_ 100 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_VIEW_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698