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
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_STUB_PASSWORD_MANAGER_CLIENT_H_
6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_STUB_PASSWORD_MANAGER_CLIENT_H_
8 #include "components/password_manager/core/browser/password_manager_client.h"
10 namespace password_manager {
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
14 // trivial stubs. Do NOT use in production, only use in tests.
15 class StubPasswordManagerClient : public PasswordManagerClient {
17 StubPasswordManagerClient();
18 virtual ~StubPasswordManagerClient();
20 // PasswordManagerClient:
21 virtual bool IsSyncAccountCredential(
22 const std::string& username, const std::string& origin) const OVERRIDE;
23 virtual bool ShouldFilterAutofillResult(
24 const autofill::PasswordForm& form) OVERRIDE;
25 virtual void PromptUserToSavePassword(
26 scoped_ptr<PasswordFormManager> form_to_save) OVERRIDE;
27 virtual void AutomaticPasswordSave(
28 scoped_ptr<PasswordFormManager> saved_manager) OVERRIDE;
29 virtual void AuthenticateAutofillAndFillForm(
30 scoped_ptr<autofill::PasswordFormFillData> fill_data) OVERRIDE;
31 virtual PrefService* GetPrefs() OVERRIDE;
32 virtual PasswordStore* GetPasswordStore() OVERRIDE;
33 virtual PasswordManagerDriver* GetDriver() OVERRIDE;
36 DISALLOW_COPY_AND_ASSIGN(StubPasswordManagerClient);
39 } // namespace password_manager
41 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_STUB_PASSWORD_MANAGER_CLIENT_H_