Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / password_manager / mock_password_store.h
bloba7629b9dde64bd0936185eb1fa7fdc54f8187e6d
1 // Copyright (c) 2012 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 CHROME_BROWSER_PASSWORD_MANAGER_MOCK_PASSWORD_STORE_H_
6 #define CHROME_BROWSER_PASSWORD_MANAGER_MOCK_PASSWORD_STORE_H_
8 #include "chrome/browser/password_manager/password_store.h"
9 #include "components/autofill/core/common/password_form.h"
10 #include "testing/gmock/include/gmock/gmock.h"
12 namespace content {
13 class BrowserContext;
16 class MockPasswordStore : public PasswordStore {
17 public:
18 MockPasswordStore();
20 static scoped_refptr<RefcountedBrowserContextKeyedService> Build(
21 content::BrowserContext* profile);
23 MOCK_METHOD1(RemoveLogin, void(const autofill::PasswordForm&));
24 MOCK_METHOD3(GetLogins,
25 CancelableTaskTracker::TaskId(
26 const autofill::PasswordForm&,
27 PasswordStore::AuthorizationPromptPolicy prompt_policy,
28 PasswordStoreConsumer*));
29 MOCK_METHOD1(AddLogin, void(const autofill::PasswordForm&));
30 MOCK_METHOD1(UpdateLogin, void(const autofill::PasswordForm&));
31 MOCK_METHOD0(ReportMetrics, void());
32 MOCK_METHOD0(ReportMetricsImpl, void());
33 MOCK_METHOD1(AddLoginImpl, void(const autofill::PasswordForm&));
34 MOCK_METHOD1(UpdateLoginImpl, void(const autofill::PasswordForm&));
35 MOCK_METHOD1(RemoveLoginImpl, void(const autofill::PasswordForm&));
36 MOCK_METHOD2(RemoveLoginsCreatedBetweenImpl, void(const base::Time&,
37 const base::Time&));
38 MOCK_METHOD3(GetLoginsImpl,
39 void(const autofill::PasswordForm& form,
40 PasswordStore::AuthorizationPromptPolicy prompt_policy,
41 const ConsumerCallbackRunner& callback_runner));
42 MOCK_METHOD1(GetAutofillableLoginsImpl, void(GetLoginsRequest*));
43 MOCK_METHOD1(GetBlacklistLoginsImpl, void(GetLoginsRequest*));
44 MOCK_METHOD1(FillAutofillableLogins,
45 bool(std::vector<autofill::PasswordForm*>*));
46 MOCK_METHOD1(FillBlacklistLogins,
47 bool(std::vector<autofill::PasswordForm*>*));
49 virtual void ShutdownOnUIThread();
51 protected:
52 virtual ~MockPasswordStore();
55 #endif // CHROME_BROWSER_PASSWORD_MANAGER_MOCK_PASSWORD_STORE_H_