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

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

Issue 1143343005: chrome/browser: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 5 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
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/test_profile_sync_service.h" 5 #include "chrome/browser/sync/test_profile_sync_service.h"
6 6
7 #include "base/location.h"
7 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/single_thread_task_runner.h"
10 #include "base/thread_task_runner_handle.h"
8 #include "chrome/browser/chrome_notification_types.h" 11 #include "chrome/browser/chrome_notification_types.h"
9 #include "chrome/browser/invalidation/profile_invalidation_provider_factory.h" 12 #include "chrome/browser/invalidation/profile_invalidation_provider_factory.h"
10 #include "chrome/browser/profiles/profile.h" 13 #include "chrome/browser/profiles/profile.h"
11 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" 14 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
12 #include "chrome/browser/signin/signin_manager_factory.h" 15 #include "chrome/browser/signin/signin_manager_factory.h"
13 #include "chrome/browser/sync/glue/sync_backend_host.h" 16 #include "chrome/browser/sync/glue/sync_backend_host.h"
14 #include "chrome/browser/sync/glue/sync_backend_host_core.h" 17 #include "chrome/browser/sync/glue/sync_backend_host_core.h"
15 #include "chrome/browser/sync/profile_sync_components_factory.h" 18 #include "chrome/browser/sync/profile_sync_components_factory.h"
16 #include "chrome/browser/sync/profile_sync_components_factory_mock.h" 19 #include "chrome/browser/sync/profile_sync_components_factory_mock.h"
17 #include "chrome/browser/sync/profile_sync_service_factory.h" 20 #include "chrome/browser/sync/profile_sync_service_factory.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 const base::Callback<void(syncer::ModelTypeSet, 83 const base::Callback<void(syncer::ModelTypeSet,
81 syncer::ModelTypeSet)>& ready_task, 84 syncer::ModelTypeSet)>& ready_task,
82 const base::Closure& retry_callback) { 85 const base::Closure& retry_callback) {
83 syncer::ModelTypeSet failed_configuration_types; 86 syncer::ModelTypeSet failed_configuration_types;
84 87
85 // The first parameter there should be the set of enabled types. That's not 88 // The first parameter there should be the set of enabled types. That's not
86 // something we have access to from this strange test harness. We'll just 89 // something we have access to from this strange test harness. We'll just
87 // send back the list of newly configured types instead and hope it doesn't 90 // send back the list of newly configured types instead and hope it doesn't
88 // break anything. 91 // break anything.
89 // Posted to avoid re-entrancy issues. 92 // Posted to avoid re-entrancy issues.
90 base::MessageLoop::current()->PostTask( 93 base::ThreadTaskRunnerHandle::Get()->PostTask(
91 FROM_HERE, 94 FROM_HERE,
92 base::Bind(&SyncBackendHostForProfileSyncTest:: 95 base::Bind(&SyncBackendHostForProfileSyncTest::
93 FinishConfigureDataTypesOnFrontendLoop, 96 FinishConfigureDataTypesOnFrontendLoop,
94 base::Unretained(this), 97 base::Unretained(this),
95 syncer::Difference(to_download, failed_configuration_types), 98 syncer::Difference(to_download, failed_configuration_types),
96 syncer::Difference(to_download, failed_configuration_types), 99 syncer::Difference(to_download, failed_configuration_types),
97 failed_configuration_types, ready_task)); 100 failed_configuration_types, ready_task));
98 } 101 }
99 102
100 } // namespace browser_sync 103 } // namespace browser_sync
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 base::MessageLoop::current()->Quit(); 178 base::MessageLoop::current()->Quit();
176 } 179 }
177 180
178 UserShare* TestProfileSyncService::GetUserShare() const { 181 UserShare* TestProfileSyncService::GetUserShare() const {
179 return backend_->GetUserShare(); 182 return backend_->GetUserShare();
180 } 183 }
181 184
182 bool TestProfileSyncService::NeedBackup() const { 185 bool TestProfileSyncService::NeedBackup() const {
183 return false; 186 return false;
184 } 187 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698