Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 14 matching lines...) Expand all Loading... | |
| 25 class ManagePasswordsIcon; | 25 class ManagePasswordsIcon; |
| 26 | 26 |
| 27 // Per-tab class to control the Omnibox password icon and bubble. | 27 // Per-tab class to control the Omnibox password icon and bubble. |
| 28 class ManagePasswordsUIController | 28 class ManagePasswordsUIController |
| 29 : public content::WebContentsObserver, | 29 : public content::WebContentsObserver, |
| 30 public content::WebContentsUserData<ManagePasswordsUIController>, | 30 public content::WebContentsUserData<ManagePasswordsUIController>, |
| 31 public password_manager::PasswordStore::Observer { | 31 public password_manager::PasswordStore::Observer { |
| 32 public: | 32 public: |
| 33 ~ManagePasswordsUIController() override; | 33 ~ManagePasswordsUIController() override; |
| 34 | 34 |
| 35 // Called when password manager failed to detect the form and user is a part | |
| 36 // of corresponding experiment. Triggers the UI to ask user if he want to | |
|
vabr (Chromium)
2014/12/03 14:08:06
grammar nit: "he wants" or "they want"
(Note that
melandory
2014/12/04 10:33:47
Done.
| |
| 37 // report the |host| and maybe report |host| based on user response. | |
|
vabr (Chromium)
2014/12/03 14:08:06
The absence of explicit scopes (parentheses) in th
melandory
2014/12/04 10:33:47
Done.
| |
| 38 void OnAskToReportURL(const std::string& host); | |
| 39 | |
| 35 // Called when the user submits a form containing login information, so we | 40 // Called when the user submits a form containing login information, so we |
| 36 // can handle later requests to save or blacklist that login information. | 41 // can handle later requests to save or blacklist that login information. |
| 37 // This stores the provided object in form_manager_ and triggers the UI to | 42 // This stores the provided object in form_manager_ and triggers the UI to |
| 38 // prompt the user about whether they would like to save the password. | 43 // prompt the user about whether they would like to save the password. |
| 39 void OnPasswordSubmitted( | 44 void OnPasswordSubmitted( |
| 40 scoped_ptr<password_manager::PasswordFormManager> form_manager); | 45 scoped_ptr<password_manager::PasswordFormManager> form_manager); |
| 41 | 46 |
| 42 // Called when the site asks user to choose from credentials. This triggers | 47 // Called when the site asks user to choose from credentials. This triggers |
| 43 // the UI to prompt the user. |credentials| shouldn't be empty. | 48 // the UI to prompt the user. |credentials| shouldn't be empty. |
| 44 bool OnChooseCredentials( | 49 bool OnChooseCredentials( |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 180 | 185 |
| 181 // The origin of the form we're currently dealing with; we'll use this to | 186 // The origin of the form we're currently dealing with; we'll use this to |
| 182 // determine which PasswordStore changes we should care about when updating | 187 // determine which PasswordStore changes we should care about when updating |
| 183 // |password_form_map_|. | 188 // |password_form_map_|. |
| 184 GURL origin_; | 189 GURL origin_; |
| 185 | 190 |
| 186 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsUIController); | 191 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsUIController); |
| 187 }; | 192 }; |
| 188 | 193 |
| 189 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_ | 194 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_ |
| OLD | NEW |