Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(254)

Side by Side Diff: chrome/browser/password_manager/chrome_password_manager_client.h

Issue 1415533013: Fix password manager internals renderer reporting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Separate dummy log manager Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 void ForceSavePassword() override; 61 void ForceSavePassword() override;
62 void NotifyUserAutoSignin( 62 void NotifyUserAutoSignin(
63 ScopedVector<autofill::PasswordForm> local_forms) override; 63 ScopedVector<autofill::PasswordForm> local_forms) override;
64 void AutomaticPasswordSave(scoped_ptr<password_manager::PasswordFormManager> 64 void AutomaticPasswordSave(scoped_ptr<password_manager::PasswordFormManager>
65 saved_form_manager) override; 65 saved_form_manager) override;
66 void PasswordWasAutofilled(const autofill::PasswordFormMap& best_matches, 66 void PasswordWasAutofilled(const autofill::PasswordFormMap& best_matches,
67 const GURL& origin) const override; 67 const GURL& origin) const override;
68 PrefService* GetPrefs() override; 68 PrefService* GetPrefs() override;
69 password_manager::PasswordStore* GetPasswordStore() const override; 69 password_manager::PasswordStore* GetPasswordStore() const override;
70 password_manager::PasswordSyncState GetPasswordSyncState() const override; 70 password_manager::PasswordSyncState GetPasswordSyncState() const override;
71 void OnLogRouterAvailabilityChanged(bool router_can_be_used) override;
72 void LogSavePasswordProgress(const std::string& text) const override;
73 bool IsLoggingActive() const override;
74 bool WasLastNavigationHTTPError() const override; 71 bool WasLastNavigationHTTPError() const override;
75 bool DidLastPageLoadEncounterSSLErrors() const override; 72 bool DidLastPageLoadEncounterSSLErrors() const override;
76 bool IsOffTheRecord() const override; 73 bool IsOffTheRecord() const override;
77 const password_manager::PasswordManager* GetPasswordManager() const override; 74 const password_manager::PasswordManager* GetPasswordManager() const override;
78 autofill::AutofillManager* GetAutofillManagerForMainFrame() override; 75 autofill::AutofillManager* GetAutofillManagerForMainFrame() override;
79 const GURL& GetMainFrameURL() const override; 76 const GURL& GetMainFrameURL() const override;
80 bool IsUpdatePasswordUIEnabled() const override; 77 bool IsUpdatePasswordUIEnabled() const override;
81 const GURL& GetLastCommittedEntryURL() const override; 78 const GURL& GetLastCommittedEntryURL() const override;
82 const password_manager::CredentialsFilter* GetStoreResultFilter() 79 const password_manager::CredentialsFilter* GetStoreResultFilter()
83 const override; 80 const override;
81 const password_manager::LogManager* GetLogManager() const override;
82 password_manager::LogRouter* GetLogRouter() const override;
84 83
85 // Hides any visible generation UI. 84 // Hides any visible generation UI.
86 void HidePasswordGenerationPopup(); 85 void HidePasswordGenerationPopup();
87 86
88 static void CreateForWebContentsWithAutofillClient( 87 static void CreateForWebContentsWithAutofillClient(
89 content::WebContents* contents, 88 content::WebContents* contents,
90 autofill::AutofillClient* autofill_client); 89 autofill::AutofillClient* autofill_client);
91 90
92 // Observer for PasswordGenerationPopup events. Used for testing. 91 // Observer for PasswordGenerationPopup events. Used for testing.
93 void SetTestObserver(autofill::PasswordGenerationPopupObserver* observer); 92 void SetTestObserver(autofill::PasswordGenerationPopupObserver* observer);
94 93
94 // Notifies all associated PasswordManagerDriver instances about whether
95 // logging is available.
96 void NotifyDriversAboutLoggingAvailability(bool is_available);
vasilii 2015/11/13 12:17:31 Should be private.
vabr (Chromium) 2015/11/13 20:48:18 Done.
97
95 // Returns true if the bubble UI is enabled, and false if we're still using 98 // Returns true if the bubble UI is enabled, and false if we're still using
96 // the sad old Infobar UI. 99 // the sad old Infobar UI.
97 static bool IsTheHotNewBubbleUIEnabled(); 100 static bool IsTheHotNewBubbleUIEnabled();
98 101
99 // Returns true if the password manager should be enabled during sync signin. 102 // Returns true if the password manager should be enabled during sync signin.
100 static bool EnabledForSyncSignin(); 103 static bool EnabledForSyncSignin();
101 104
102 protected: 105 protected:
103 // Callable for tests. 106 // Callable for tests.
104 ChromePasswordManagerClient(content::WebContents* web_contents, 107 ChromePasswordManagerClient(content::WebContents* web_contents,
(...skipping 25 matching lines...) Expand all
130 133
131 // Causes the password editing UI to be shown anchored at |element_bounds|. 134 // Causes the password editing UI to be shown anchored at |element_bounds|.
132 void ShowPasswordEditingPopup(content::RenderFrameHost* render_frame_host, 135 void ShowPasswordEditingPopup(content::RenderFrameHost* render_frame_host,
133 const gfx::RectF& bounds, 136 const gfx::RectF& bounds,
134 const autofill::PasswordForm& form); 137 const autofill::PasswordForm& form);
135 138
136 // Notify the PasswordManager that generation is available for |form|. Used 139 // Notify the PasswordManager that generation is available for |form|. Used
137 // for UMA stats. 140 // for UMA stats.
138 void GenerationAvailableForForm(const autofill::PasswordForm& form); 141 void GenerationAvailableForForm(const autofill::PasswordForm& form);
139 142
140 // Sends a message to the renderer with the current value of
141 // |can_use_log_router_|.
142 void NotifyRendererOfLoggingAvailability();
143
144 Profile* const profile_; 143 Profile* const profile_;
145 144
146 password_manager::PasswordManager password_manager_; 145 password_manager::PasswordManager password_manager_;
147 146
148 password_manager::ContentPasswordManagerDriverFactory* driver_factory_; 147 password_manager::ContentPasswordManagerDriverFactory* driver_factory_;
149 148
150 password_manager::CredentialManagerDispatcher 149 password_manager::CredentialManagerDispatcher
151 credential_manager_dispatcher_; 150 credential_manager_dispatcher_;
152 151
153 // Observer for password generation popup. 152 // Observer for password generation popup.
154 autofill::PasswordGenerationPopupObserver* observer_; 153 autofill::PasswordGenerationPopupObserver* observer_;
155 154
156 // Controls the popup 155 // Controls the popup
157 base::WeakPtr< 156 base::WeakPtr<
158 autofill::PasswordGenerationPopupControllerImpl> popup_controller_; 157 autofill::PasswordGenerationPopupControllerImpl> popup_controller_;
159 158
160 // True if |this| is registered with some LogRouter which can accept logs.
161 bool can_use_log_router_;
162
163 // Set to false to disable password saving (will no longer ask if you 159 // Set to false to disable password saving (will no longer ask if you
164 // want to save passwords and also won't fill the passwords). 160 // want to save passwords and also won't fill the passwords).
165 BooleanPrefMember saving_and_filling_passwords_enabled_; 161 BooleanPrefMember saving_and_filling_passwords_enabled_;
166 162
167 const password_manager::SyncStoreResultFilter credentials_filter_; 163 const password_manager::SyncStoreResultFilter credentials_filter_;
168 164
165 scoped_ptr<password_manager::LogManager> log_manager_;
166
169 DISALLOW_COPY_AND_ASSIGN(ChromePasswordManagerClient); 167 DISALLOW_COPY_AND_ASSIGN(ChromePasswordManagerClient);
170 }; 168 };
171 169
172 #endif // CHROME_BROWSER_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_ 170 #endif // CHROME_BROWSER_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698