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_STUB_PASSWORD_MANAGER_CLIENT_H_ | 5 #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_STUB_PASSWORD_MANAGER_CLIENT_H_ |
6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_STUB_PASSWORD_MANAGER_CLIENT_H_ | 6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_STUB_PASSWORD_MANAGER_CLIENT_H_ |
7 | 7 |
8 #include "components/password_manager/core/browser/password_manager_client.h" | 8 #include "components/password_manager/core/browser/password_manager_client.h" |
9 | 9 |
10 namespace password_manager { | 10 namespace password_manager { |
11 | 11 |
12 // Use this class as a base for mock or test clients to avoid stubbing | 12 // Use this class as a base for mock or test clients to avoid stubbing |
13 // uninteresting pure virtual methods. All the implemented methods are just | 13 // uninteresting pure virtual methods. All the implemented methods are just |
14 // trivial stubs. Do NOT use in production, only use in tests. | 14 // trivial stubs. Do NOT use in production, only use in tests. |
15 class StubPasswordManagerClient : public PasswordManagerClient { | 15 class StubPasswordManagerClient : public PasswordManagerClient { |
16 public: | 16 public: |
17 StubPasswordManagerClient(); | 17 StubPasswordManagerClient(); |
18 virtual ~StubPasswordManagerClient(); | 18 virtual ~StubPasswordManagerClient(); |
19 | 19 |
20 // PasswordManagerClient: | 20 // PasswordManagerClient: |
21 virtual void PromptUserToSavePassword(PasswordFormManager* form_to_save) | 21 virtual void PromptUserToSavePassword(PasswordFormManager* form_to_save) |
22 OVERRIDE; | 22 OVERRIDE; |
23 virtual void AuthenticateAutofillAndFillForm( | 23 virtual void AuthenticateAutofillAndFillForm( |
24 scoped_ptr<autofill::PasswordFormFillData> fill_data) OVERRIDE; | 24 scoped_ptr<autofill::PasswordFormFillData> fill_data) OVERRIDE; |
25 virtual PrefService* GetPrefs() OVERRIDE; | 25 virtual PrefService* GetPrefs() OVERRIDE; |
26 virtual PasswordStore* GetPasswordStore() OVERRIDE; | 26 virtual PasswordStore* GetPasswordStore() OVERRIDE; |
27 virtual PasswordManagerDriver* GetDriver() OVERRIDE; | 27 virtual PasswordManagerDriver* GetDriver() OVERRIDE; |
| 28 virtual void SetLogger(PasswordManagerLogger* logger) OVERRIDE; |
| 29 virtual void LogSavePasswordProgress(const std::string& text) OVERRIDE; |
| 30 virtual bool IsLoggingActive() const OVERRIDE; |
28 | 31 |
29 private: | 32 private: |
30 DISALLOW_COPY_AND_ASSIGN(StubPasswordManagerClient); | 33 DISALLOW_COPY_AND_ASSIGN(StubPasswordManagerClient); |
31 }; | 34 }; |
32 | 35 |
33 } // namespace password_manager | 36 } // namespace password_manager |
34 | 37 |
35 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_STUB_PASSWORD_MANAGER_CLIENT
_H_ | 38 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_STUB_PASSWORD_MANAGER_CLIENT
_H_ |
OLD | NEW |