| 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/managed_mode/managed_user_signin_manager_wrapper.h" | 8 #include "chrome/browser/managed_mode/managed_user_signin_manager_wrapper.h" |
| 9 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" | 9 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" |
| 10 #include "chrome/browser/signin/signin_manager.h" | 10 #include "chrome/browser/signin/signin_manager.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 #include "testing/gmock/include/gmock/gmock.h" | 23 #include "testing/gmock/include/gmock/gmock.h" |
| 24 | 24 |
| 25 using syncer::InternalComponentsFactory; | 25 using syncer::InternalComponentsFactory; |
| 26 using syncer::TestInternalComponentsFactory; | 26 using syncer::TestInternalComponentsFactory; |
| 27 using syncer::UserShare; | 27 using syncer::UserShare; |
| 28 | 28 |
| 29 namespace browser_sync { | 29 namespace browser_sync { |
| 30 | 30 |
| 31 SyncBackendHostForProfileSyncTest::SyncBackendHostForProfileSyncTest( | 31 SyncBackendHostForProfileSyncTest::SyncBackendHostForProfileSyncTest( |
| 32 Profile* profile, | 32 Profile* profile, |
| 33 const base::WeakPtr<SyncPrefs>& sync_prefs, | 33 const base::WeakPtr<sync_driver::SyncPrefs>& sync_prefs, |
| 34 base::Closure callback) | 34 base::Closure callback) |
| 35 : browser_sync::SyncBackendHostImpl( | 35 : browser_sync::SyncBackendHostImpl(profile->GetDebugName(), |
| 36 profile->GetDebugName(), profile, sync_prefs), | 36 profile, |
| 37 callback_(callback) {} | 37 sync_prefs), |
| 38 callback_(callback) {} |
| 38 | 39 |
| 39 SyncBackendHostForProfileSyncTest::~SyncBackendHostForProfileSyncTest() {} | 40 SyncBackendHostForProfileSyncTest::~SyncBackendHostForProfileSyncTest() {} |
| 40 | 41 |
| 41 void SyncBackendHostForProfileSyncTest::InitCore( | 42 void SyncBackendHostForProfileSyncTest::InitCore( |
| 42 scoped_ptr<DoInitializeOptions> options) { | 43 scoped_ptr<DoInitializeOptions> options) { |
| 43 options->http_bridge_factory = | 44 options->http_bridge_factory = |
| 44 scoped_ptr<syncer::HttpPostProviderFactory>( | 45 scoped_ptr<syncer::HttpPostProviderFactory>( |
| 45 new browser_sync::TestHttpBridgeFactory()); | 46 new browser_sync::TestHttpBridgeFactory()); |
| 46 options->sync_manager_factory.reset( | 47 options->sync_manager_factory.reset( |
| 47 new syncer::SyncManagerFactoryForProfileSyncTest(callback_)); | 48 new syncer::SyncManagerFactoryForProfileSyncTest(callback_)); |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 | 158 |
| 158 void TestProfileSyncService::OnConfigureDone( | 159 void TestProfileSyncService::OnConfigureDone( |
| 159 const browser_sync::DataTypeManager::ConfigureResult& result) { | 160 const browser_sync::DataTypeManager::ConfigureResult& result) { |
| 160 ProfileSyncService::OnConfigureDone(result); | 161 ProfileSyncService::OnConfigureDone(result); |
| 161 base::MessageLoop::current()->Quit(); | 162 base::MessageLoop::current()->Quit(); |
| 162 } | 163 } |
| 163 | 164 |
| 164 UserShare* TestProfileSyncService::GetUserShare() const { | 165 UserShare* TestProfileSyncService::GetUserShare() const { |
| 165 return backend_->GetUserShare(); | 166 return backend_->GetUserShare(); |
| 166 } | 167 } |
| OLD | NEW |