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.cc

Issue 364343002: Kill WebDataService, move (WIN only) Password code into separate class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments and clean up Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « components/webdata/common/web_data_service_test_util.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "components/webdata/common/web_data_service_test_util.h" 5 #include "components/webdata/common/web_data_service_test_util.h"
6 6
7 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" 7 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h"
8 8
9 using autofill::AutofillWebDataService; 9 using autofill::AutofillWebDataService;
10 10
11 MockWebDataServiceWrapperBase::MockWebDataServiceWrapperBase() { 11 MockWebDataServiceWrapperBase::MockWebDataServiceWrapperBase() {
12 } 12 }
13 13
14 MockWebDataServiceWrapperBase::~MockWebDataServiceWrapperBase() { 14 MockWebDataServiceWrapperBase::~MockWebDataServiceWrapperBase() {
15 } 15 }
16 16
17 void MockWebDataServiceWrapperBase::Shutdown() { 17 void MockWebDataServiceWrapperBase::Shutdown() {
18 } 18 }
19 19
20 // TODO(caitkp): This won't scale well. As we get more WebData subclasses, we 20 // TODO(caitkp): This won't scale well. As we get more WebData subclasses, we
21 // will probably need a better way to create these mocks rather than passing 21 // will probably need a better way to create these mocks rather than passing
22 // all the webdatas in. 22 // all the webdatas in.
23 MockWebDataServiceWrapper::MockWebDataServiceWrapper( 23 MockWebDataServiceWrapper::MockWebDataServiceWrapper(
24 scoped_refptr<WebDataService> fake_service,
25 scoped_refptr<AutofillWebDataService> fake_autofill, 24 scoped_refptr<AutofillWebDataService> fake_autofill,
26 scoped_refptr<TokenWebData> fake_token) 25 scoped_refptr<TokenWebData> fake_token)
27 : fake_autofill_web_data_(fake_autofill), 26 : fake_autofill_web_data_(fake_autofill),
28 fake_token_web_data_(fake_token), 27 fake_token_web_data_(fake_token) {
29 fake_web_data_(fake_service) {
30 } 28 }
31 29
32 MockWebDataServiceWrapper::~MockWebDataServiceWrapper() { 30 MockWebDataServiceWrapper::~MockWebDataServiceWrapper() {
33 } 31 }
34 32
35 scoped_refptr<AutofillWebDataService> 33 scoped_refptr<AutofillWebDataService>
36 MockWebDataServiceWrapper::GetAutofillWebData() { 34 MockWebDataServiceWrapper::GetAutofillWebData() {
37 return fake_autofill_web_data_; 35 return fake_autofill_web_data_;
38 } 36 }
39 37
40 scoped_refptr<TokenWebData> MockWebDataServiceWrapper::GetTokenWebData() { 38 scoped_refptr<TokenWebData> MockWebDataServiceWrapper::GetTokenWebData() {
41 return fake_token_web_data_; 39 return fake_token_web_data_;
42 } 40 }
43
44 scoped_refptr<WebDataService> MockWebDataServiceWrapper::GetWebData() {
45 return fake_web_data_;
46 }
OLDNEW
« no previous file with comments | « components/webdata/common/web_data_service_test_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698