Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / components / password_manager / core / browser / stub_password_manager_client.h
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.
4
5 #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_STUB_PASSWORD_MANAGER_CLIENT_H_
6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_STUB_PASSWORD_MANAGER_CLIENT_H_
7
8 #include "components/password_manager/core/browser/password_manager_client.h"
9
10 namespace password_manager {
11
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 {
16  public:
17   StubPasswordManagerClient();
18   ~StubPasswordManagerClient() override;
19
20   // PasswordManagerClient:
21   std::string GetSyncUsername() const override;
22   bool IsSyncAccountCredential(const std::string& username,
23                                const std::string& origin) const override;
24   bool ShouldFilterAutofillResult(const autofill::PasswordForm& form) override;
25   bool PromptUserToSavePassword(
26       scoped_ptr<PasswordFormManager> form_to_save) override;
27   void AutomaticPasswordSave(
28       scoped_ptr<PasswordFormManager> saved_manager) override;
29   PrefService* GetPrefs() override;
30   PasswordStore* GetPasswordStore() override;
31   PasswordManagerDriver* GetDriver() override;
32
33  private:
34   DISALLOW_COPY_AND_ASSIGN(StubPasswordManagerClient);
35 };
36
37 }  // namespace password_manager
38
39 #endif  // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_STUB_PASSWORD_MANAGER_CLIENT_H_