Chromium Code Reviews| Index: chrome/browser/ui/passwords/manage_passwords_bubble_model.h |
| diff --git a/chrome/browser/ui/passwords/manage_passwords_bubble_model.h b/chrome/browser/ui/passwords/manage_passwords_bubble_model.h |
| index 16e0dcb359354c06cbc778c5e6eaa46e7fe87872..d492ae00c8c51bd91dfc47cc9d649c81d95f6d10 100644 |
| --- a/chrome/browser/ui/passwords/manage_passwords_bubble_model.h |
| +++ b/chrome/browser/ui/passwords/manage_passwords_bubble_model.h |
| @@ -63,9 +63,12 @@ class ManagePasswordsBubbleModel : public content::WebContentsObserver { |
| // Called by the view code when the site is unblacklisted. |
| void OnUnblacklistClicked(); |
| - // Called by the view code when the save button in clicked by the user. |
| + // Called by the view code when the save button is clicked by the user. |
| void OnSaveClicked(); |
| + // Called by the view code when the update link is clicked by the user. |
| + void OnUpdateClicked(const autofill::PasswordForm& password_form); |
| + |
| // Called by the view code when the "Done" button is clicked by the user. |
| void OnDoneClicked(); |
| @@ -100,6 +103,7 @@ class ManagePasswordsBubbleModel : public content::WebContentsObserver { |
| password_manager::ui::State state() const { return state_; } |
| const base::string16& title() const { return title_; } |
| + const base::string16& save_button_text() const { return save_button_text_; } |
| const autofill::PasswordForm& pending_password() const { |
| return pending_password_; |
| } |
| @@ -126,6 +130,15 @@ class ManagePasswordsBubbleModel : public content::WebContentsObserver { |
| return title_brand_link_range_; |
| } |
| + bool account_for_update_selection() const { |
|
vabr (Chromium)
2015/06/03 16:33:26
nit: Please don't inline the definition of the met
vabr (Chromium)
2015/06/03 16:33:26
Also, the name sounds a little cryptic (I'm not su
vasilii
2015/06/03 18:32:02
I suppose it should be something like "ShouldShowM
dvadym
2015/06/19 15:27:29
Thanks, it was temporary name from early prototypi
|
| + return pending_password_.is_password_change_form_without_username && |
| + local_credentials_.size() > 1; |
| + } |
| + |
| + bool is_password_change_form_without_username() const { |
| + return pending_password_.is_password_change_form_without_username; |
| + } |
| + |
| Profile* GetProfile() const; |
| // Returns true iff the new UI should be presented to user for managing and |
| @@ -160,6 +173,7 @@ class ManagePasswordsBubbleModel : public content::WebContentsObserver { |
| GURL origin_; |
| password_manager::ui::State state_; |
| base::string16 title_; |
| + base::string16 save_button_text_; |
| // Range of characters in the title that contains the Smart Lock Brand and |
| // should point to an article. For the default title the range is empty. |
| gfx::Range title_brand_link_range_; |