OLD | NEW |
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 <utility> |
| 8 |
7 #include "base/location.h" | 9 #include "base/location.h" |
8 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
9 #include "base/single_thread_task_runner.h" | 11 #include "base/single_thread_task_runner.h" |
10 #include "base/thread_task_runner_handle.h" | 12 #include "base/thread_task_runner_handle.h" |
11 #include "chrome/browser/chrome_notification_types.h" | 13 #include "chrome/browser/chrome_notification_types.h" |
12 #include "chrome/browser/invalidation/profile_invalidation_provider_factory.h" | 14 #include "chrome/browser/invalidation/profile_invalidation_provider_factory.h" |
13 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
14 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" | 16 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" |
15 #include "chrome/browser/signin/signin_manager_factory.h" | 17 #include "chrome/browser/signin/signin_manager_factory.h" |
16 #include "chrome/browser/sync/chrome_sync_client.h" | 18 #include "chrome/browser/sync/chrome_sync_client.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 // It'd be nice if we avoided creating the InternalComponentsFactory in the | 94 // It'd be nice if we avoided creating the InternalComponentsFactory in the |
93 // first place, but SyncBackendHost will have created one by now so we must | 95 // first place, but SyncBackendHost will have created one by now so we must |
94 // free it. Grab the switches to pass on first. | 96 // free it. Grab the switches to pass on first. |
95 InternalComponentsFactory::Switches factory_switches = | 97 InternalComponentsFactory::Switches factory_switches = |
96 options->internal_components_factory->GetSwitches(); | 98 options->internal_components_factory->GetSwitches(); |
97 options->internal_components_factory.reset( | 99 options->internal_components_factory.reset( |
98 new TestInternalComponentsFactory( | 100 new TestInternalComponentsFactory( |
99 factory_switches, InternalComponentsFactory::STORAGE_IN_MEMORY, | 101 factory_switches, InternalComponentsFactory::STORAGE_IN_MEMORY, |
100 NULL)); | 102 NULL)); |
101 | 103 |
102 SyncBackendHostImpl::InitCore(options.Pass()); | 104 SyncBackendHostImpl::InitCore(std::move(options)); |
103 } | 105 } |
104 | 106 |
105 void SyncBackendHostForProfileSyncTest::RequestConfigureSyncer( | 107 void SyncBackendHostForProfileSyncTest::RequestConfigureSyncer( |
106 syncer::ConfigureReason reason, | 108 syncer::ConfigureReason reason, |
107 syncer::ModelTypeSet to_download, | 109 syncer::ModelTypeSet to_download, |
108 syncer::ModelTypeSet to_purge, | 110 syncer::ModelTypeSet to_purge, |
109 syncer::ModelTypeSet to_journal, | 111 syncer::ModelTypeSet to_journal, |
110 syncer::ModelTypeSet to_unapply, | 112 syncer::ModelTypeSet to_unapply, |
111 syncer::ModelTypeSet to_ignore, | 113 syncer::ModelTypeSet to_ignore, |
112 const syncer::ModelSafeRoutingInfo& routing_info, | 114 const syncer::ModelSafeRoutingInfo& routing_info, |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 base::MessageLoop::current()->QuitWhenIdle(); | 206 base::MessageLoop::current()->QuitWhenIdle(); |
205 } | 207 } |
206 | 208 |
207 UserShare* TestProfileSyncService::GetUserShare() const { | 209 UserShare* TestProfileSyncService::GetUserShare() const { |
208 return backend_->GetUserShare(); | 210 return backend_->GetUserShare(); |
209 } | 211 } |
210 | 212 |
211 bool TestProfileSyncService::NeedBackup() const { | 213 bool TestProfileSyncService::NeedBackup() const { |
212 return false; | 214 return false; |
213 } | 215 } |
OLD | NEW |