Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(567)

Side by Side Diff: components/webdata/common/web_data_service_test_util.h

Issue 666133002: Standardize usage of virtual/override/final in components/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_WEBDATA_COMMON_WEB_DATA_SERVICE_TEST_UTIL_H__ 5 #ifndef COMPONENTS_WEBDATA_COMMON_WEB_DATA_SERVICE_TEST_UTIL_H__
6 #define COMPONENTS_WEBDATA_COMMON_WEB_DATA_SERVICE_TEST_UTIL_H__ 6 #define COMPONENTS_WEBDATA_COMMON_WEB_DATA_SERVICE_TEST_UTIL_H__
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "chrome/browser/webdata/web_data_service_factory.h" 10 #include "chrome/browser/webdata/web_data_service_factory.h"
11 #include "components/signin/core/browser/webdata/token_web_data.h" 11 #include "components/signin/core/browser/webdata/token_web_data.h"
12 12
13 // Base class for mocks of WebDataService, that does nothing in 13 // Base class for mocks of WebDataService, that does nothing in
14 // Shutdown(). 14 // Shutdown().
15 class MockWebDataServiceWrapperBase : public WebDataServiceWrapper { 15 class MockWebDataServiceWrapperBase : public WebDataServiceWrapper {
16 public: 16 public:
17 MockWebDataServiceWrapperBase(); 17 MockWebDataServiceWrapperBase();
18 virtual ~MockWebDataServiceWrapperBase(); 18 ~MockWebDataServiceWrapperBase() override;
19 19
20 virtual void Shutdown() override; 20 void Shutdown() override;
21 21
22 private: 22 private:
23 DISALLOW_COPY_AND_ASSIGN(MockWebDataServiceWrapperBase); 23 DISALLOW_COPY_AND_ASSIGN(MockWebDataServiceWrapperBase);
24 }; 24 };
25 25
26 // Pass your fake WebDataService in the constructor and this will 26 // Pass your fake WebDataService in the constructor and this will
27 // serve it up via GetWebData(). 27 // serve it up via GetWebData().
28 class MockWebDataServiceWrapper : public MockWebDataServiceWrapperBase { 28 class MockWebDataServiceWrapper : public MockWebDataServiceWrapperBase {
29 public: 29 public:
30 MockWebDataServiceWrapper( 30 MockWebDataServiceWrapper(
31 scoped_refptr<autofill::AutofillWebDataService> fake_autofill, 31 scoped_refptr<autofill::AutofillWebDataService> fake_autofill,
32 scoped_refptr<TokenWebData> fake_token); 32 scoped_refptr<TokenWebData> fake_token);
33 33
34 virtual ~MockWebDataServiceWrapper(); 34 ~MockWebDataServiceWrapper() override;
35 35
36 virtual scoped_refptr<autofill::AutofillWebDataService> 36 scoped_refptr<autofill::AutofillWebDataService> GetAutofillWebData() override;
37 GetAutofillWebData() override;
38 37
39 virtual scoped_refptr<TokenWebData> GetTokenWebData() override; 38 scoped_refptr<TokenWebData> GetTokenWebData() override;
40 39
41 protected: 40 protected:
42 scoped_refptr<autofill::AutofillWebDataService> fake_autofill_web_data_; 41 scoped_refptr<autofill::AutofillWebDataService> fake_autofill_web_data_;
43 scoped_refptr<TokenWebData> fake_token_web_data_; 42 scoped_refptr<TokenWebData> fake_token_web_data_;
44 43
45 private: 44 private:
46 DISALLOW_COPY_AND_ASSIGN(MockWebDataServiceWrapper); 45 DISALLOW_COPY_AND_ASSIGN(MockWebDataServiceWrapper);
47 }; 46 };
48 47
49 #endif // COMPONENTS_WEBDATA_COMMON_WEB_DATA_SERVICE_TEST_UTIL_H__ 48 #endif // COMPONENTS_WEBDATA_COMMON_WEB_DATA_SERVICE_TEST_UTIL_H__
OLDNEW
« no previous file with comments | « components/web_modal/web_contents_modal_dialog_manager_unittest.cc ('k') | components/webdata/common/web_database_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698