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

Side by Side Diff: chrome/browser/sync/abstract_profile_sync_service_test.cc

Issue 9703038: Profiles: Really fix refcounted services. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Forgot to save a file. >_< Created 8 years, 9 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) 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 #include "chrome/browser/sync/abstract_profile_sync_service_test.h" 5 #include "chrome/browser/sync/abstract_profile_sync_service_test.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "chrome/browser/sync/internal_api/write_transaction.h" 10 #include "chrome/browser/sync/internal_api/write_transaction.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 } 116 }
117 117
118 bool AbstractProfileSyncServiceTest::CreateRoot(ModelType model_type) { 118 bool AbstractProfileSyncServiceTest::CreateRoot(ModelType model_type) {
119 return ProfileSyncServiceTestHelper::CreateRoot( 119 return ProfileSyncServiceTestHelper::CreateRoot(
120 model_type, 120 model_type,
121 service_->GetUserShare(), 121 service_->GetUserShare(),
122 service_->id_factory()); 122 service_->id_factory());
123 } 123 }
124 124
125 // static 125 // static
126 ProfileKeyedBase* AbstractProfileSyncServiceTest::BuildTokenService( 126 ProfileKeyedService* AbstractProfileSyncServiceTest::BuildTokenService(
127 Profile* profile) { 127 Profile* profile) {
128 return new TokenService; 128 return new TokenService;
129 } 129 }
130 130
131 CreateRootHelper::CreateRootHelper(AbstractProfileSyncServiceTest* test, 131 CreateRootHelper::CreateRootHelper(AbstractProfileSyncServiceTest* test,
132 ModelType model_type) 132 ModelType model_type)
133 : ALLOW_THIS_IN_INITIALIZER_LIST(callback_( 133 : ALLOW_THIS_IN_INITIALIZER_LIST(callback_(
134 base::Bind(&CreateRootHelper::CreateRootCallback, 134 base::Bind(&CreateRootHelper::CreateRootCallback,
135 base::Unretained(this)))), 135 base::Unretained(this)))),
136 test_(test), 136 test_(test),
137 model_type_(model_type), 137 model_type_(model_type),
138 success_(false) { 138 success_(false) {
139 } 139 }
140 140
141 CreateRootHelper::~CreateRootHelper() { 141 CreateRootHelper::~CreateRootHelper() {
142 } 142 }
143 143
144 const base::Closure& CreateRootHelper::callback() const { 144 const base::Closure& CreateRootHelper::callback() const {
145 return callback_; 145 return callback_;
146 } 146 }
147 147
148 bool CreateRootHelper::success() { 148 bool CreateRootHelper::success() {
149 return success_; 149 return success_;
150 } 150 }
151 151
152 void CreateRootHelper::CreateRootCallback() { 152 void CreateRootHelper::CreateRootCallback() {
153 success_ = test_->CreateRoot(model_type_); 153 success_ = test_->CreateRoot(model_type_);
154 } 154 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/abstract_profile_sync_service_test.h ('k') | chrome/browser/sync/glue/password_model_worker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698