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_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_ | 5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_ |
6 #define CHROME_BROWSER_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_ | 6 #define CHROME_BROWSER_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/prefs/pref_member.h" | 10 #include "base/prefs/pref_member.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 | 43 |
44 // PasswordManagerClient implementation. | 44 // PasswordManagerClient implementation. |
45 bool IsAutomaticPasswordSavingEnabled() const override; | 45 bool IsAutomaticPasswordSavingEnabled() const override; |
46 bool IsPasswordManagementEnabledForCurrentPage() const override; | 46 bool IsPasswordManagementEnabledForCurrentPage() const override; |
47 bool IsSavingEnabledForCurrentPage() const override; | 47 bool IsSavingEnabledForCurrentPage() const override; |
48 bool ShouldFilterAutofillResult(const autofill::PasswordForm& form) override; | 48 bool ShouldFilterAutofillResult(const autofill::PasswordForm& form) override; |
49 std::string GetSyncUsername() const override; | 49 std::string GetSyncUsername() const override; |
50 bool IsSyncAccountCredential(const std::string& username, | 50 bool IsSyncAccountCredential(const std::string& username, |
51 const std::string& realm) const override; | 51 const std::string& realm) const override; |
52 void AutofillResultsComputed() override; | 52 void AutofillResultsComputed() override; |
53 bool PromptUserToSavePassword( | 53 bool PromptUserToSaveOrUpdatePassword( |
54 scoped_ptr<password_manager::PasswordFormManager> form_to_save, | 54 scoped_ptr<password_manager::PasswordFormManager> form_to_save, |
55 password_manager::CredentialSourceType type) override; | 55 password_manager::CredentialSourceType type, |
| 56 bool update_password) override; |
56 bool PromptUserToChooseCredentials( | 57 bool PromptUserToChooseCredentials( |
57 ScopedVector<autofill::PasswordForm> local_forms, | 58 ScopedVector<autofill::PasswordForm> local_forms, |
58 ScopedVector<autofill::PasswordForm> federated_forms, | 59 ScopedVector<autofill::PasswordForm> federated_forms, |
59 const GURL& origin, | 60 const GURL& origin, |
60 base::Callback<void(const password_manager::CredentialInfo&)> callback) | 61 base::Callback<void(const password_manager::CredentialInfo&)> callback) |
61 override; | 62 override; |
62 void ForceSavePassword() override; | 63 void ForceSavePassword() override; |
63 void NotifyUserAutoSignin( | 64 void NotifyUserAutoSignin( |
64 ScopedVector<autofill::PasswordForm> local_forms) override; | 65 ScopedVector<autofill::PasswordForm> local_forms) override; |
65 void AutomaticPasswordSave(scoped_ptr<password_manager::PasswordFormManager> | 66 void AutomaticPasswordSave(scoped_ptr<password_manager::PasswordFormManager> |
66 saved_form_manager) override; | 67 saved_form_manager) override; |
67 void PasswordWasAutofilled( | 68 void PasswordWasAutofilled( |
68 const autofill::PasswordFormMap& best_matches) const override; | 69 const autofill::PasswordFormMap& best_matches) const override; |
69 void PasswordAutofillWasBlocked( | 70 void PasswordAutofillWasBlocked( |
70 const autofill::PasswordFormMap& best_matches) const override; | 71 const autofill::PasswordFormMap& best_matches) const override; |
71 PrefService* GetPrefs() override; | 72 PrefService* GetPrefs() override; |
72 password_manager::PasswordStore* GetPasswordStore() const override; | 73 password_manager::PasswordStore* GetPasswordStore() const override; |
73 password_manager::PasswordSyncState GetPasswordSyncState() const override; | 74 password_manager::PasswordSyncState GetPasswordSyncState() const override; |
74 void OnLogRouterAvailabilityChanged(bool router_can_be_used) override; | 75 void OnLogRouterAvailabilityChanged(bool router_can_be_used) override; |
75 void LogSavePasswordProgress(const std::string& text) const override; | 76 void LogSavePasswordProgress(const std::string& text) const override; |
76 bool IsLoggingActive() const override; | 77 bool IsLoggingActive() const override; |
77 bool WasLastNavigationHTTPError() const override; | 78 bool WasLastNavigationHTTPError() const override; |
78 bool DidLastPageLoadEncounterSSLErrors() const override; | 79 bool DidLastPageLoadEncounterSSLErrors() const override; |
79 bool IsOffTheRecord() const override; | 80 bool IsOffTheRecord() const override; |
80 password_manager::PasswordManager* GetPasswordManager() override; | 81 password_manager::PasswordManager* GetPasswordManager() override; |
81 autofill::AutofillManager* GetAutofillManagerForMainFrame() override; | 82 autofill::AutofillManager* GetAutofillManagerForMainFrame() override; |
82 const GURL& GetMainFrameURL() const override; | 83 const GURL& GetMainFrameURL() const override; |
| 84 bool IsUpdatePasswordUIEnabled() const override; |
83 | 85 |
84 // Hides any visible generation UI. | 86 // Hides any visible generation UI. |
85 void HidePasswordGenerationPopup(); | 87 void HidePasswordGenerationPopup(); |
86 | 88 |
87 static void CreateForWebContentsWithAutofillClient( | 89 static void CreateForWebContentsWithAutofillClient( |
88 content::WebContents* contents, | 90 content::WebContents* contents, |
89 autofill::AutofillClient* autofill_client); | 91 autofill::AutofillClient* autofill_client); |
90 | 92 |
91 // Observer for PasswordGenerationPopup events. Used for testing. | 93 // Observer for PasswordGenerationPopup events. Used for testing. |
92 void SetTestObserver(autofill::PasswordGenerationPopupObserver* observer); | 94 void SetTestObserver(autofill::PasswordGenerationPopupObserver* observer); |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 bool sync_credential_was_filtered_; | 177 bool sync_credential_was_filtered_; |
176 | 178 |
177 // Set to false to disable password saving (will no longer ask if you | 179 // Set to false to disable password saving (will no longer ask if you |
178 // want to save passwords but will continue to fill passwords). | 180 // want to save passwords but will continue to fill passwords). |
179 BooleanPrefMember saving_passwords_enabled_; | 181 BooleanPrefMember saving_passwords_enabled_; |
180 | 182 |
181 DISALLOW_COPY_AND_ASSIGN(ChromePasswordManagerClient); | 183 DISALLOW_COPY_AND_ASSIGN(ChromePasswordManagerClient); |
182 }; | 184 }; |
183 | 185 |
184 #endif // CHROME_BROWSER_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_ | 186 #endif // CHROME_BROWSER_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_ |
OLD | NEW |