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

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

Issue 16154031: Un-refcount AutofillWebData and TokenWebData (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase on ToT Created 7 years, 6 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
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.h" 9 #include "base/message_loop.h"
10 #include "chrome/browser/webdata/token_web_data.h" 10 #include "chrome/browser/webdata/token_web_data.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 private: 51 private:
52 DISALLOW_COPY_AND_ASSIGN(MockWebDataServiceWrapperBase); 52 DISALLOW_COPY_AND_ASSIGN(MockWebDataServiceWrapperBase);
53 }; 53 };
54 54
55 // Pass your fake WebDataService in the constructor and this will 55 // Pass your fake WebDataService in the constructor and this will
56 // serve it up via GetWebData(). 56 // serve it up via GetWebData().
57 class MockWebDataServiceWrapper : public MockWebDataServiceWrapperBase { 57 class MockWebDataServiceWrapper : public MockWebDataServiceWrapperBase {
58 public: 58 public:
59 MockWebDataServiceWrapper( 59 MockWebDataServiceWrapper(
60 scoped_refptr<WebDataService> fake_service, 60 scoped_refptr<WebDataService> fake_service,
61 scoped_refptr<autofill::AutofillWebDataService> fake_autofill, 61 autofill::AutofillWebDataService* fake_autofill,
62 scoped_refptr<TokenWebData> fake_token); 62 TokenWebData* fake_token);
63 63
64 virtual ~MockWebDataServiceWrapper(); 64 virtual ~MockWebDataServiceWrapper();
65 65
66 virtual scoped_refptr<autofill::AutofillWebDataService> 66 virtual autofill::AutofillWebDataService* GetAutofillWebData() OVERRIDE;
67 GetAutofillWebData() OVERRIDE;
68 67
69 virtual scoped_refptr<TokenWebData> GetTokenWebData() OVERRIDE; 68 virtual TokenWebData* GetTokenWebData() OVERRIDE;
70 69
71 virtual scoped_refptr<WebDataService> GetWebData() OVERRIDE; 70 virtual scoped_refptr<WebDataService> GetWebData() OVERRIDE;
72 71
73 protected: 72 protected:
74 scoped_refptr<autofill::AutofillWebDataService> fake_autofill_web_data_; 73 scoped_ptr<autofill::AutofillWebDataService> fake_autofill_web_data_;
75 scoped_refptr<TokenWebData> fake_token_web_data_; 74 scoped_ptr<TokenWebData> fake_token_web_data_;
76 scoped_refptr<WebDataService> fake_web_data_; 75 scoped_refptr<WebDataService> fake_web_data_;
77 76
78 private: 77 private:
79 DISALLOW_COPY_AND_ASSIGN(MockWebDataServiceWrapper); 78 DISALLOW_COPY_AND_ASSIGN(MockWebDataServiceWrapper);
80 }; 79 };
81 80
82 #endif // COMPONENTS_WEBDATA_COMMON_WEB_DATA_SERVICE_TEST_UTIL_H__ 81 #endif // COMPONENTS_WEBDATA_COMMON_WEB_DATA_SERVICE_TEST_UTIL_H__
OLDNEW
« no previous file with comments | « components/webdata/common/web_data_service_base.h ('k') | components/webdata/common/web_data_service_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698