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

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

Issue 1151373006: Update Confirmation UI for saved password change (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed unit test compilation error, updated comments 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_UI_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_
7 7
8 #include "base/memory/scoped_vector.h" 8 #include "base/memory/scoped_vector.h"
9 #include "base/timer/elapsed_timer.h" 9 #include "base/timer/elapsed_timer.h"
10 #include "chrome/browser/ui/passwords/manage_passwords_state.h" 10 #include "chrome/browser/ui/passwords/manage_passwords_state.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 // stores a copy of |password_form_map| so that we can offer the user the 69 // stores a copy of |password_form_map| so that we can offer the user the
70 // ability to reenable the manager for this form. 70 // ability to reenable the manager for this form.
71 void OnBlacklistBlockedAutofill( 71 void OnBlacklistBlockedAutofill(
72 const autofill::PasswordFormMap& password_form_map); 72 const autofill::PasswordFormMap& password_form_map);
73 73
74 // PasswordStore::Observer implementation. 74 // PasswordStore::Observer implementation.
75 void OnLoginsChanged( 75 void OnLoginsChanged(
76 const password_manager::PasswordStoreChangeList& changes) override; 76 const password_manager::PasswordStoreChangeList& changes) override;
77 77
78 // Called from the model when the user chooses to save a password; passes the 78 // Called from the model when the user chooses to save a password; passes the
79 // action off to the FormManager. The controller MUST be in a pending state, 79 // action to the FormManager. The controller MUST be in a pending state, and
vabr (Chromium) 2015/07/24 08:24:29 nit: "must" and "will". RFCs and other standards u
vabr (Chromium) 2015/07/24 08:24:29 nit: PasswordFormManager or "form manager". Just F
dvadym 2015/07/24 16:42:39 Done.
dvadym 2015/07/24 16:42:39 Done.
80 // WILL be in MANAGE_STATE after this method executes.
81 virtual void SavePassword();
82
83 // Called from the model when the user chooses to update a password; passes
84 // the action to the FormManager. The controller MUST be in a pending state,
80 // and WILL be in MANAGE_STATE after this method executes. 85 // and WILL be in MANAGE_STATE after this method executes.
81 virtual void SavePassword(); 86 virtual void UpdatePassword(const autofill::PasswordForm& password_form);
82 87
83 // Called from the model when the user chooses a credential. 88 // Called from the model when the user chooses a credential.
84 // The controller MUST be in a pending credentials state. 89 // The controller MUST be in a pending credentials state.
85 virtual void ChooseCredential( 90 virtual void ChooseCredential(
86 const autofill::PasswordForm& form, 91 const autofill::PasswordForm& form,
87 password_manager::CredentialType credential_type); 92 password_manager::CredentialType credential_type);
88 93
89 // Called from the model when the user chooses to never save passwords; passes 94 // Called from the model when the user chooses to never save passwords; passes
90 // the action off to the FormManager. The controller MUST be in a pending 95 // the action off to the FormManager. The controller MUST be in a pending
91 // state, and WILL be in BLACKLIST_STATE after this method executes. 96 // state, and WILL be in BLACKLIST_STATE after this method executes.
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 return passwords_data_.federated_credentials_forms(); 149 return passwords_data_.federated_credentials_forms();
145 } 150 }
146 151
147 protected: 152 protected:
148 explicit ManagePasswordsUIController( 153 explicit ManagePasswordsUIController(
149 content::WebContents* web_contents); 154 content::WebContents* web_contents);
150 155
151 // The pieces of saving and blacklisting passwords that interact with 156 // The pieces of saving and blacklisting passwords that interact with
152 // FormManager, split off into internal functions for testing/mocking. 157 // FormManager, split off into internal functions for testing/mocking.
153 virtual void SavePasswordInternal(); 158 virtual void SavePasswordInternal();
159 virtual void UpdatePasswordInternal(
160 const autofill::PasswordForm& password_form);
154 virtual void NeverSavePasswordInternal(); 161 virtual void NeverSavePasswordInternal();
155 162
156 // Called when a PasswordForm is autofilled, when a new PasswordForm is 163 // Called when a PasswordForm is autofilled, when a new PasswordForm is
157 // submitted, or when a navigation occurs to update the visibility of the 164 // submitted, or when a navigation occurs to update the visibility of the
158 // manage passwords icon and bubble. 165 // manage passwords icon and bubble.
159 virtual void UpdateBubbleAndIconVisibility(); 166 virtual void UpdateBubbleAndIconVisibility();
160 167
161 // Returns the time elapsed since |timer_| was initialized, 168 // Returns the time elapsed since |timer_| was initialized,
162 // or base::TimeDelta::Max() if |timer_| was not initialized. 169 // or base::TimeDelta::Max() if |timer_| was not initialized.
163 virtual base::TimeDelta Elapsed() const; 170 virtual base::TimeDelta Elapsed() const;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 scoped_ptr<base::ElapsedTimer> timer_; 202 scoped_ptr<base::ElapsedTimer> timer_;
196 203
197 // Contains true if the bubble is to be popped up in the next call to 204 // Contains true if the bubble is to be popped up in the next call to
198 // UpdateBubbleAndIconVisibility(). 205 // UpdateBubbleAndIconVisibility().
199 bool should_pop_up_bubble_; 206 bool should_pop_up_bubble_;
200 207
201 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsUIController); 208 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsUIController);
202 }; 209 };
203 210
204 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_ 211 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698