OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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_MOCK_PASSWORD_STORE_H_ | 5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_MOCK_PASSWORD_STORE_H_ |
6 #define CHROME_BROWSER_PASSWORD_MANAGER_MOCK_PASSWORD_STORE_H_ | 6 #define CHROME_BROWSER_PASSWORD_MANAGER_MOCK_PASSWORD_STORE_H_ |
7 | 7 |
8 #include "chrome/browser/password_manager/password_store.h" | 8 #include "chrome/browser/password_manager/password_store.h" |
9 #include "content/public/common/password_form.h" | 9 #include "content/public/common/password_form.h" |
10 #include "testing/gmock/include/gmock/gmock.h" | 10 #include "testing/gmock/include/gmock/gmock.h" |
11 | 11 |
12 class Profile; | 12 namespace content { |
| 13 class BrowserContext; |
| 14 } |
13 | 15 |
14 class MockPasswordStore : public PasswordStore { | 16 class MockPasswordStore : public PasswordStore { |
15 public: | 17 public: |
16 MockPasswordStore(); | 18 MockPasswordStore(); |
17 | 19 |
18 static scoped_refptr<RefcountedProfileKeyedService> Build(Profile* profile); | 20 static scoped_refptr<RefcountedProfileKeyedService> Build( |
| 21 content::BrowserContext* profile); |
19 | 22 |
20 MOCK_METHOD1(RemoveLogin, void(const content::PasswordForm&)); | 23 MOCK_METHOD1(RemoveLogin, void(const content::PasswordForm&)); |
21 MOCK_METHOD2(GetLogins, | 24 MOCK_METHOD2(GetLogins, |
22 CancelableTaskTracker::TaskId(const content::PasswordForm&, | 25 CancelableTaskTracker::TaskId(const content::PasswordForm&, |
23 PasswordStoreConsumer*)); | 26 PasswordStoreConsumer*)); |
24 MOCK_METHOD1(AddLogin, void(const content::PasswordForm&)); | 27 MOCK_METHOD1(AddLogin, void(const content::PasswordForm&)); |
25 MOCK_METHOD1(UpdateLogin, void(const content::PasswordForm&)); | 28 MOCK_METHOD1(UpdateLogin, void(const content::PasswordForm&)); |
26 MOCK_METHOD0(ReportMetrics, void()); | 29 MOCK_METHOD0(ReportMetrics, void()); |
27 MOCK_METHOD0(ReportMetricsImpl, void()); | 30 MOCK_METHOD0(ReportMetricsImpl, void()); |
28 MOCK_METHOD1(AddLoginImpl, void(const content::PasswordForm&)); | 31 MOCK_METHOD1(AddLoginImpl, void(const content::PasswordForm&)); |
(...skipping 11 matching lines...) Expand all Loading... |
40 MOCK_METHOD1(FillBlacklistLogins, | 43 MOCK_METHOD1(FillBlacklistLogins, |
41 bool(std::vector<content::PasswordForm*>*)); | 44 bool(std::vector<content::PasswordForm*>*)); |
42 | 45 |
43 virtual void ShutdownOnUIThread(); | 46 virtual void ShutdownOnUIThread(); |
44 | 47 |
45 protected: | 48 protected: |
46 virtual ~MockPasswordStore(); | 49 virtual ~MockPasswordStore(); |
47 }; | 50 }; |
48 | 51 |
49 #endif // CHROME_BROWSER_PASSWORD_MANAGER_MOCK_PASSWORD_STORE_H_ | 52 #endif // CHROME_BROWSER_PASSWORD_MANAGER_MOCK_PASSWORD_STORE_H_ |
OLD | NEW |