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" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
44 // syncing. | 44 // syncing. |
45 virtual bool IsSyncAccountCredential( | 45 virtual bool IsSyncAccountCredential( |
46 const std::string& username, const std::string& origin) const = 0; | 46 const std::string& username, const std::string& origin) const = 0; |
47 | 47 |
48 // Called when all autofill results have been computed. Client can use | 48 // Called when all autofill results have been computed. Client can use |
49 // this signal to report statistics. Default implementation is a noop. | 49 // this signal to report statistics. Default implementation is a noop. |
50 virtual void AutofillResultsComputed() {} | 50 virtual void AutofillResultsComputed() {} |
51 | 51 |
52 // Informs the embedder of a password form that can be saved if the user | 52 // Informs the embedder of a password form that can be saved if the user |
53 // allows it. The embedder is not required to prompt the user if it decides | 53 // allows it. The embedder is not required to prompt the user if it decides |
54 // that this form doesn't need to be saved. | 54 // that this form doesn't need to be saved. |
vabr (Chromium)
2014/09/26 15:39:47
Please comment on the meaning of the return value.
Sunil Ratnu
2014/09/26 16:01:20
Done.
| |
55 virtual void PromptUserToSavePassword( | 55 virtual bool PromptUserToSavePassword( |
56 scoped_ptr<PasswordFormManager> form_to_save) = 0; | 56 scoped_ptr<PasswordFormManager> form_to_save) = 0; |
57 | 57 |
58 // Called when a password is saved in an automated fashion. Embedder may | 58 // Called when a password is saved in an automated fashion. Embedder may |
59 // inform the user that this save has occured. | 59 // inform the user that this save has occured. |
60 virtual void AutomaticPasswordSave( | 60 virtual void AutomaticPasswordSave( |
61 scoped_ptr<PasswordFormManager> saved_form_manager) = 0; | 61 scoped_ptr<PasswordFormManager> saved_form_manager) = 0; |
62 | 62 |
63 // Called when a password is autofilled. |best_matches| contains the | 63 // Called when a password is autofilled. |best_matches| contains the |
64 // PasswordForm into which a password was filled: the client may choose to | 64 // PasswordForm into which a password was filled: the client may choose to |
65 // save this to the PasswordStore, for example. Default implementation is a | 65 // save this to the PasswordStore, for example. Default implementation is a |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
133 bool zero_click_only, | 133 bool zero_click_only, |
134 const std::vector<GURL>& federations) {} | 134 const std::vector<GURL>& federations) {} |
135 | 135 |
136 private: | 136 private: |
137 DISALLOW_COPY_AND_ASSIGN(PasswordManagerClient); | 137 DISALLOW_COPY_AND_ASSIGN(PasswordManagerClient); |
138 }; | 138 }; |
139 | 139 |
140 } // namespace password_manager | 140 } // namespace password_manager |
141 | 141 |
142 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_CLIENT_H_ | 142 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_CLIENT_H_ |
OLD | NEW |