| 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 "chrome/browser/chrome_notification_types.h" | 7 #include "chrome/browser/chrome_notification_types.h" |
| 8 #include "chrome/browser/invalidation/profile_invalidation_provider_factory.h" | 8 #include "chrome/browser/invalidation/profile_invalidation_provider_factory.h" |
| 9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" | 10 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 options->credentials.sync_token = "token"; | 54 options->credentials.sync_token = "token"; |
| 55 options->credentials.scope_set.insert(GaiaConstants::kChromeSyncOAuth2Scope); | 55 options->credentials.scope_set.insert(GaiaConstants::kChromeSyncOAuth2Scope); |
| 56 options->restored_key_for_bootstrapping = ""; | 56 options->restored_key_for_bootstrapping = ""; |
| 57 | 57 |
| 58 // It'd be nice if we avoided creating the InternalComponentsFactory in the | 58 // It'd be nice if we avoided creating the InternalComponentsFactory in the |
| 59 // first place, but SyncBackendHost will have created one by now so we must | 59 // first place, but SyncBackendHost will have created one by now so we must |
| 60 // free it. Grab the switches to pass on first. | 60 // free it. Grab the switches to pass on first. |
| 61 InternalComponentsFactory::Switches factory_switches = | 61 InternalComponentsFactory::Switches factory_switches = |
| 62 options->internal_components_factory->GetSwitches(); | 62 options->internal_components_factory->GetSwitches(); |
| 63 options->internal_components_factory.reset( | 63 options->internal_components_factory.reset( |
| 64 new TestInternalComponentsFactory( | 64 new TestInternalComponentsFactory(factory_switches, |
| 65 factory_switches, InternalComponentsFactory::STORAGE_IN_MEMORY, | 65 syncer::STORAGE_IN_MEMORY)); |
| 66 NULL)); | |
| 67 | 66 |
| 68 SyncBackendHostImpl::InitCore(options.Pass()); | 67 SyncBackendHostImpl::InitCore(options.Pass()); |
| 69 } | 68 } |
| 70 | 69 |
| 71 void SyncBackendHostForProfileSyncTest::RequestConfigureSyncer( | 70 void SyncBackendHostForProfileSyncTest::RequestConfigureSyncer( |
| 72 syncer::ConfigureReason reason, | 71 syncer::ConfigureReason reason, |
| 73 syncer::ModelTypeSet to_download, | 72 syncer::ModelTypeSet to_download, |
| 74 syncer::ModelTypeSet to_purge, | 73 syncer::ModelTypeSet to_purge, |
| 75 syncer::ModelTypeSet to_journal, | 74 syncer::ModelTypeSet to_journal, |
| 76 syncer::ModelTypeSet to_unapply, | 75 syncer::ModelTypeSet to_unapply, |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 | 168 |
| 170 void TestProfileSyncService::OnConfigureDone( | 169 void TestProfileSyncService::OnConfigureDone( |
| 171 const sync_driver::DataTypeManager::ConfigureResult& result) { | 170 const sync_driver::DataTypeManager::ConfigureResult& result) { |
| 172 ProfileSyncService::OnConfigureDone(result); | 171 ProfileSyncService::OnConfigureDone(result); |
| 173 base::MessageLoop::current()->Quit(); | 172 base::MessageLoop::current()->Quit(); |
| 174 } | 173 } |
| 175 | 174 |
| 176 UserShare* TestProfileSyncService::GetUserShare() const { | 175 UserShare* TestProfileSyncService::GetUserShare() const { |
| 177 return backend_->GetUserShare(); | 176 return backend_->GetUserShare(); |
| 178 } | 177 } |
| OLD | NEW |