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

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

Issue 15517005: Remove references to Profile from browser_context_keyed_service. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase & style Created 7 years, 7 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/test_profile_sync_service.h" 10 #include "chrome/browser/sync/test_profile_sync_service.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 db_thread_.Stop(); 66 db_thread_.Stop();
67 ui_loop_.RunUntilIdle(); 67 ui_loop_.RunUntilIdle();
68 } 68 }
69 69
70 bool AbstractProfileSyncServiceTest::CreateRoot(ModelType model_type) { 70 bool AbstractProfileSyncServiceTest::CreateRoot(ModelType model_type) {
71 return syncer::TestUserShare::CreateRoot(model_type, 71 return syncer::TestUserShare::CreateRoot(model_type,
72 sync_service_->GetUserShare()); 72 sync_service_->GetUserShare());
73 } 73 }
74 74
75 // static 75 // static
76 ProfileKeyedService* AbstractProfileSyncServiceTest::BuildTokenService( 76 BrowserContextKeyedService* AbstractProfileSyncServiceTest::BuildTokenService(
77 content::BrowserContext* profile) { 77 content::BrowserContext* profile) {
78 return new TokenService; 78 return new TokenService;
79 } 79 }
80 80
81 CreateRootHelper::CreateRootHelper(AbstractProfileSyncServiceTest* test, 81 CreateRootHelper::CreateRootHelper(AbstractProfileSyncServiceTest* test,
82 ModelType model_type) 82 ModelType model_type)
83 : callback_(base::Bind(&CreateRootHelper::CreateRootCallback, 83 : callback_(base::Bind(&CreateRootHelper::CreateRootCallback,
84 base::Unretained(this))), 84 base::Unretained(this))),
85 test_(test), 85 test_(test),
86 model_type_(model_type), 86 model_type_(model_type),
87 success_(false) { 87 success_(false) {
88 } 88 }
89 89
90 CreateRootHelper::~CreateRootHelper() { 90 CreateRootHelper::~CreateRootHelper() {
91 } 91 }
92 92
93 const base::Closure& CreateRootHelper::callback() const { 93 const base::Closure& CreateRootHelper::callback() const {
94 return callback_; 94 return callback_;
95 } 95 }
96 96
97 bool CreateRootHelper::success() { 97 bool CreateRootHelper::success() {
98 return success_; 98 return success_;
99 } 99 }
100 100
101 void CreateRootHelper::CreateRootCallback() { 101 void CreateRootHelper::CreateRootCallback() {
102 success_ = test_->CreateRoot(model_type_); 102 success_ = test_->CreateRoot(model_type_);
103 } 103 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698