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/signin/signin_manager.h" | 7 #include "chrome/browser/signin/signin_manager.h" |
8 #include "chrome/browser/sync/abstract_profile_sync_service_test.h" | 8 #include "chrome/browser/sync/abstract_profile_sync_service_test.h" |
9 #include "chrome/browser/sync/glue/data_type_controller.h" | 9 #include "chrome/browser/sync/glue/data_type_controller.h" |
10 #include "chrome/browser/sync/glue/sync_backend_host.h" | 10 #include "chrome/browser/sync/glue/sync_backend_host.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 : browser_sync::SyncBackendHost( | 37 : browser_sync::SyncBackendHost( |
38 profile->GetDebugName(), profile, sync_prefs, invalidator_storage), | 38 profile->GetDebugName(), profile, sync_prefs, invalidator_storage), |
39 synchronous_init_(synchronous_init), | 39 synchronous_init_(synchronous_init), |
40 fail_initial_download_(fail_initial_download), | 40 fail_initial_download_(fail_initial_download), |
41 use_real_database_(use_real_database) {} | 41 use_real_database_(use_real_database) {} |
42 | 42 |
43 SyncBackendHostForProfileSyncTest::~SyncBackendHostForProfileSyncTest() {} | 43 SyncBackendHostForProfileSyncTest::~SyncBackendHostForProfileSyncTest() {} |
44 | 44 |
45 namespace { | 45 namespace { |
46 | 46 |
47 syncer::HttpPostProviderFactory* MakeTestHttpBridgeFactory() { | 47 scoped_ptr<syncer::HttpPostProviderFactory> MakeTestHttpBridgeFactory() { |
48 return new browser_sync::TestHttpBridgeFactory(); | 48 return scoped_ptr<syncer::HttpPostProviderFactory>( |
| 49 new browser_sync::TestHttpBridgeFactory()); |
49 } | 50 } |
50 | 51 |
51 } // namespace | 52 } // namespace |
52 | 53 |
53 void SyncBackendHostForProfileSyncTest::InitCore( | 54 void SyncBackendHostForProfileSyncTest::InitCore( |
54 const DoInitializeOptions& options) { | 55 const DoInitializeOptions& options) { |
55 DoInitializeOptions test_options = options; | 56 DoInitializeOptions test_options = options; |
56 test_options.make_http_bridge_factory_fn = | 57 test_options.make_http_bridge_factory_fn = |
57 base::Bind(&MakeTestHttpBridgeFactory); | 58 base::Bind(&MakeTestHttpBridgeFactory); |
58 test_options.credentials.email = "testuser@gmail.com"; | 59 test_options.credentials.email = "testuser@gmail.com"; |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 void TestProfileSyncService::CreateBackend() { | 204 void TestProfileSyncService::CreateBackend() { |
204 backend_.reset(new browser_sync::SyncBackendHostForProfileSyncTest( | 205 backend_.reset(new browser_sync::SyncBackendHostForProfileSyncTest( |
205 profile(), | 206 profile(), |
206 sync_prefs_.AsWeakPtr(), | 207 sync_prefs_.AsWeakPtr(), |
207 invalidator_storage_.AsWeakPtr(), | 208 invalidator_storage_.AsWeakPtr(), |
208 set_initial_sync_ended_on_init_, | 209 set_initial_sync_ended_on_init_, |
209 synchronous_backend_initialization_, | 210 synchronous_backend_initialization_, |
210 fail_initial_download_, | 211 fail_initial_download_, |
211 use_real_database_)); | 212 use_real_database_)); |
212 } | 213 } |
OLD | NEW |