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 "components/password_manager/content/browser/content_credential_manager
_dispatcher.h" | 10 #include "components/password_manager/content/browser/content_credential_manager
_dispatcher.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 : public password_manager::PasswordManagerClient, | 36 : public password_manager::PasswordManagerClient, |
37 public content::WebContentsObserver, | 37 public content::WebContentsObserver, |
38 public content::WebContentsUserData<ChromePasswordManagerClient> { | 38 public content::WebContentsUserData<ChromePasswordManagerClient> { |
39 public: | 39 public: |
40 ~ChromePasswordManagerClient() override; | 40 ~ChromePasswordManagerClient() override; |
41 | 41 |
42 // PasswordManagerClient implementation. | 42 // PasswordManagerClient implementation. |
43 bool IsAutomaticPasswordSavingEnabled() const override; | 43 bool IsAutomaticPasswordSavingEnabled() const override; |
44 bool IsPasswordManagerEnabledForCurrentPage() const override; | 44 bool IsPasswordManagerEnabledForCurrentPage() const override; |
45 bool ShouldFilterAutofillResult(const autofill::PasswordForm& form) override; | 45 bool ShouldFilterAutofillResult(const autofill::PasswordForm& form) override; |
| 46 std::string GetSyncUsername() const override; |
46 bool IsSyncAccountCredential(const std::string& username, | 47 bool IsSyncAccountCredential(const std::string& username, |
47 const std::string& origin) const override; | 48 const std::string& origin) const override; |
48 void AutofillResultsComputed() override; | 49 void AutofillResultsComputed() override; |
49 bool PromptUserToSavePassword( | 50 bool PromptUserToSavePassword( |
50 scoped_ptr<password_manager::PasswordFormManager> form_to_save) override; | 51 scoped_ptr<password_manager::PasswordFormManager> form_to_save) override; |
51 void AutomaticPasswordSave(scoped_ptr<password_manager::PasswordFormManager> | 52 void AutomaticPasswordSave(scoped_ptr<password_manager::PasswordFormManager> |
52 saved_form_manager) override; | 53 saved_form_manager) override; |
53 void PasswordWasAutofilled( | 54 void PasswordWasAutofilled( |
54 const autofill::PasswordFormMap& best_matches) const override; | 55 const autofill::PasswordFormMap& best_matches) const override; |
55 void PasswordAutofillWasBlocked( | 56 void PasswordAutofillWasBlocked( |
56 const autofill::PasswordFormMap& best_matches) const override; | 57 const autofill::PasswordFormMap& best_matches) const override; |
57 PrefService* GetPrefs() override; | 58 PrefService* GetPrefs() override; |
58 password_manager::PasswordStore* GetPasswordStore() override; | 59 password_manager::PasswordStore* GetPasswordStore() override; |
59 password_manager::PasswordManagerDriver* GetDriver() override; | 60 password_manager::PasswordManagerDriver* GetDriver() override; |
60 base::FieldTrial::Probability GetProbabilityForExperiment( | 61 base::FieldTrial::Probability GetProbabilityForExperiment( |
61 const std::string& experiment_name) override; | 62 const std::string& experiment_name) override; |
62 bool IsPasswordSyncEnabled() override; | 63 bool IsPasswordSyncEnabled( |
| 64 password_manager::CustomPassphraseState state) override; |
63 void OnLogRouterAvailabilityChanged(bool router_can_be_used) override; | 65 void OnLogRouterAvailabilityChanged(bool router_can_be_used) override; |
64 void LogSavePasswordProgress(const std::string& text) override; | 66 void LogSavePasswordProgress(const std::string& text) override; |
65 bool IsLoggingActive() const override; | 67 bool IsLoggingActive() const override; |
66 | 68 |
67 // Hides any visible generation UI. | 69 // Hides any visible generation UI. |
68 void HidePasswordGenerationPopup(); | 70 void HidePasswordGenerationPopup(); |
69 | 71 |
70 static void CreateForWebContentsWithAutofillClient( | 72 static void CreateForWebContentsWithAutofillClient( |
71 content::WebContents* contents, | 73 content::WebContents* contents, |
72 autofill::AutofillClient* autofill_client); | 74 autofill::AutofillClient* autofill_client); |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 AutofillForSyncCredentialsState autofill_sync_state_; | 161 AutofillForSyncCredentialsState autofill_sync_state_; |
160 | 162 |
161 // If the sync credential was filtered during autofill. Used for statistics | 163 // If the sync credential was filtered during autofill. Used for statistics |
162 // reporting. | 164 // reporting. |
163 bool sync_credential_was_filtered_; | 165 bool sync_credential_was_filtered_; |
164 | 166 |
165 DISALLOW_COPY_AND_ASSIGN(ChromePasswordManagerClient); | 167 DISALLOW_COPY_AND_ASSIGN(ChromePasswordManagerClient); |
166 }; | 168 }; |
167 | 169 |
168 #endif // CHROME_BROWSER_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_ | 170 #endif // CHROME_BROWSER_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_ |
OLD | NEW |