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 COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_CLIENT_H_ | 5 #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_CLIENT_H_ |
| 6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_CLIENT_H_ | 6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_CLIENT_H_ |
| 7 | 7 |
| 8 #include "base/metrics/field_trial.h" | 8 #include "base/metrics/field_trial.h" |
| 9 #include "components/autofill/core/common/password_form.h" | 9 #include "components/autofill/core/common/password_form.h" |
| 10 #include "components/autofill/core/common/password_form_fill_data.h" | 10 #include "components/autofill/core/common/password_form_fill_data.h" |
| 11 | 11 |
| 12 class PrefService; | 12 class PrefService; |
| 13 | 13 |
| 14 namespace password_manager { | 14 namespace password_manager { |
| 15 | 15 |
| 16 class PasswordFormManager; | 16 class PasswordFormManager; |
| 17 class PasswordManagerDriver; | 17 class PasswordManagerDriver; |
| 18 class PasswordStore; | 18 class PasswordStore; |
| 19 class PasswordManagerLogger; | 19 class PasswordManagerLogger; |
| 20 | 20 |
| 21 // An abstraction of operations that depend on the embedders (e.g. Chrome) | 21 // An abstraction of operations that depend on the embedders (e.g. Chrome) |
| 22 // environment. | 22 // environment. |
| 23 class PasswordManagerClient { | 23 class PasswordManagerClient { |
| 24 public: | 24 public: |
| 25 PasswordManagerClient() {} | 25 PasswordManagerClient() {} |
| 26 virtual ~PasswordManagerClient() {} | 26 virtual ~PasswordManagerClient() {} |
| 27 | 27 |
| 28 virtual bool IsAutomaticPasswordsSavingEnabled() const { | |
|
vabr (Chromium)
2014/04/28 09:13:14
Please document this method. For example:
"For aut
| |
| 29 return false; | |
|
vabr (Chromium)
2014/04/28 09:13:14
nit: Please only declare the method here, and defi
rchtara
2014/04/28 11:28:29
Done.
rchtara
2014/04/28 11:28:29
Done.
| |
| 30 } | |
| 31 | |
| 28 // Informs the embedder of a password form that can be saved if the user | 32 // Informs the embedder of a password form that can be saved if the user |
| 29 // allows it. The embedder is not required to prompt the user if it decides | 33 // allows it. The embedder is not required to prompt the user if it decides |
| 30 // that this form doesn't need to be saved. | 34 // that this form doesn't need to be saved. |
| 31 virtual void PromptUserToSavePassword(PasswordFormManager* form_to_save) = 0; | 35 virtual void PromptUserToSavePassword(PasswordFormManager* form_to_save) = 0; |
| 32 | 36 |
| 33 // Called when a password is autofilled. Default implementation is a no-op. | 37 // Called when a password is autofilled. Default implementation is a no-op. |
| 34 virtual void PasswordWasAutofilled( | 38 virtual void PasswordWasAutofilled( |
| 35 const autofill::PasswordFormMap& best_matches) const {} | 39 const autofill::PasswordFormMap& best_matches) const {} |
| 36 | 40 |
| 37 // Called when password autofill is blocked by the blacklist. Default | 41 // Called when password autofill is blocked by the blacklist. Default |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 71 // displayed, and false otherwise. | 75 // displayed, and false otherwise. |
| 72 virtual bool IsLoggingActive() const; | 76 virtual bool IsLoggingActive() const; |
| 73 | 77 |
| 74 private: | 78 private: |
| 75 DISALLOW_COPY_AND_ASSIGN(PasswordManagerClient); | 79 DISALLOW_COPY_AND_ASSIGN(PasswordManagerClient); |
| 76 }; | 80 }; |
| 77 | 81 |
| 78 } // namespace password_manager | 82 } // namespace password_manager |
| 79 | 83 |
| 80 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_CLIENT_H_ | 84 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_CLIENT_H_ |
| OLD | NEW |