| OLD | NEW |
| 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 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 class Profile; | 27 class Profile; |
| 28 | 28 |
| 29 // The desired width and height in pixels for an account avatar. | 29 // The desired width and height in pixels for an account avatar. |
| 30 constexpr int kAvatarImageSize = 32; | 30 constexpr int kAvatarImageSize = 32; |
| 31 | 31 |
| 32 // Crops and scales |image_skia| to the desired size for an account avatar. | 32 // Crops and scales |image_skia| to the desired size for an account avatar. |
| 33 gfx::ImageSkia ScaleImageForAccountAvatar(gfx::ImageSkia image_skia); | 33 gfx::ImageSkia ScaleImageForAccountAvatar(gfx::ImageSkia image_skia); |
| 34 | 34 |
| 35 // Returns the upper and lower label to be displayed in the account chooser UI | 35 // Returns the upper and lower label to be displayed in the account chooser UI |
| 36 // for |form|. | 36 // for |form|. The lower label can be multiline. |
| 37 std::pair<base::string16, base::string16> GetCredentialLabelsForAccountChooser( | 37 std::pair<base::string16, base::string16> GetCredentialLabelsForAccountChooser( |
| 38 const autofill::PasswordForm& form); | 38 const autofill::PasswordForm& form); |
| 39 | 39 |
| 40 // Sets the formatted |title| in the Save Password bubble or the Update Password | 40 // Sets the formatted |title| in the Save Password bubble or the Update Password |
| 41 // bubble (depending on |dialog_type|). If the registry controlled domain of | 41 // bubble (depending on |dialog_type|). If the registry controlled domain of |
| 42 // |user_visible_url| (i.e. the one seen in the omnibox) differs from the | 42 // |user_visible_url| (i.e. the one seen in the omnibox) differs from the |
| 43 // registry controlled domain of |form_origin_url|, sets | 43 // registry controlled domain of |form_origin_url|, sets |
| 44 // |IDS_SAVE_PASSWORD_TITLE| as the |title| so that it replaces "this site" in | 44 // |IDS_SAVE_PASSWORD_TITLE| as the |title| so that it replaces "this site" in |
| 45 // title text with output of |FormatUrlForSecurityDisplay(form_origin_url)|. | 45 // title text with output of |FormatUrlForSecurityDisplay(form_origin_url)|. |
| 46 // Otherwise, sets |IDS_SAVE_PASSWORD| as the |title| having "this site". | 46 // Otherwise, sets |IDS_SAVE_PASSWORD| as the |title| having "this site". |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 gfx::Range* link_range); | 91 gfx::Range* link_range); |
| 92 | 92 |
| 93 // 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. |
| 94 base::string16 GetDisplayUsername(const autofill::PasswordForm& form); | 94 base::string16 GetDisplayUsername(const autofill::PasswordForm& form); |
| 95 | 95 |
| 96 // 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 |
| 97 // syncs the PRIORITY_PREFERENCE). The view appearance might depend on it. | 97 // syncs the PRIORITY_PREFERENCE). The view appearance might depend on it. |
| 98 bool IsSyncingAutosignSetting(Profile* profile); | 98 bool IsSyncingAutosignSetting(Profile* profile); |
| 99 | 99 |
| 100 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_VIEW_UTILS_H_ | 100 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_VIEW_UTILS_H_ |
| OLD | NEW |