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

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

Issue 777423004: Skeleton code for experiment setup, which will determine should "Allow to collect URL?" bubble be s… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 "components/autofill/core/common/password_form.h" 10 #include "components/autofill/core/common/password_form.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 69
70 // PasswordStore::Observer implementation. 70 // PasswordStore::Observer implementation.
71 void OnLoginsChanged( 71 void OnLoginsChanged(
72 const password_manager::PasswordStoreChangeList& changes) override; 72 const password_manager::PasswordStoreChangeList& changes) override;
73 73
74 // Called from the model when the user chooses to save a password; passes the 74 // Called from the model when the user chooses to save a password; passes the
75 // action off to the FormManager. The controller MUST be in a pending state, 75 // action off to the FormManager. The controller MUST be in a pending state,
76 // and WILL be in MANAGE_STATE after this method executes. 76 // and WILL be in MANAGE_STATE after this method executes.
77 virtual void SavePassword(); 77 virtual void SavePassword();
78 78
79 // Called from the model when user allows to send feedback with URL of
80 // page where password manager has failed.
81 void SendURLFeedback();
82
79 // Called from the model when the user chooses a credential. 83 // Called from the model when the user chooses a credential.
80 // The controller MUST be in a pending credentials state. 84 // The controller MUST be in a pending credentials state.
81 virtual void ChooseCredential(bool was_chosen, 85 virtual void ChooseCredential(bool was_chosen,
82 const autofill::PasswordForm& form); 86 const autofill::PasswordForm& form);
83 87
84 // Called from the model when the user chooses to never save passwords; passes 88 // Called from the model when the user chooses to never save passwords; passes
85 // the action off to the FormManager. The controller MUST be in a pending 89 // the action off to the FormManager. The controller MUST be in a pending
86 // state, and WILL be in BLACKLIST_STATE after this method executes. 90 // state, and WILL be in BLACKLIST_STATE after this method executes.
87 virtual void NeverSavePassword(); 91 virtual void NeverSavePassword();
88 92
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 password_manager::ui::State state_; 159 password_manager::ui::State state_;
156 160
157 // Used to measure the amount of time on a page; if it's less than some 161 // Used to measure the amount of time on a page; if it's less than some
158 // reasonable limit, then don't close the bubble upon navigation. We create 162 // reasonable limit, then don't close the bubble upon navigation. We create
159 // (and destroy) the timer in DidNavigateMainFrame. 163 // (and destroy) the timer in DidNavigateMainFrame.
160 scoped_ptr<base::ElapsedTimer> timer_; 164 scoped_ptr<base::ElapsedTimer> timer_;
161 165
162 private: 166 private:
163 friend class content::WebContentsUserData<ManagePasswordsUIController>; 167 friend class content::WebContentsUserData<ManagePasswordsUIController>;
164 168
169 class URLCollectionFeedbackSender;
170
165 // Shows the password bubble without user interaction. The controller MUST 171 // Shows the password bubble without user interaction. The controller MUST
166 // be in PENDING_PASSWORD_AND_BUBBLE_STATE. 172 // be in PENDING_PASSWORD_AND_BUBBLE_STATE.
167 void ShowBubbleWithoutUserInteraction(); 173 void ShowBubbleWithoutUserInteraction();
168 174
169 // content::WebContentsObserver: 175 // content::WebContentsObserver:
170 void WebContentsDestroyed() override; 176 void WebContentsDestroyed() override;
171 177
172 // Set by OnPasswordSubmitted() when the user submits a form containing login 178 // Set by OnPasswordSubmitted() when the user submits a form containing login
173 // information. If the user responds to a subsequent "Do you want to save 179 // information. If the user responds to a subsequent "Do you want to save
174 // this password?" prompt, we ask this object to save or blacklist the 180 // this password?" prompt, we ask this object to save or blacklist the
(...skipping 10 matching lines...) Expand all
185 191
186 // The origin of the form we're currently dealing with; we'll use this to 192 // The origin of the form we're currently dealing with; we'll use this to
187 // determine which PasswordStore changes we should care about when updating 193 // determine which PasswordStore changes we should care about when updating
188 // |password_form_map_|. 194 // |password_form_map_|.
189 GURL origin_; 195 GURL origin_;
190 196
191 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsUIController); 197 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsUIController);
192 }; 198 };
193 199
194 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_ 200 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698