OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/sync/abstract_profile_sync_service_test.h" | 7 #include "chrome/browser/sync/abstract_profile_sync_service_test.h" |
8 #include "chrome/browser/sync/engine/syncapi.h" | 8 #include "chrome/browser/sync/engine/syncapi.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" |
11 #include "chrome/browser/sync/profile_sync_factory.h" | 11 #include "chrome/browser/sync/profile_sync_factory.h" |
12 #include "chrome/browser/sync/sessions/session_state.h" | 12 #include "chrome/browser/sync/sessions/session_state.h" |
13 #include "chrome/browser/sync/syncable/directory_manager.h" | 13 #include "chrome/browser/sync/syncable/directory_manager.h" |
14 #include "chrome/browser/sync/syncable/syncable.h" | 14 #include "chrome/browser/sync/syncable/syncable.h" |
15 #include "chrome/test/sync/test_http_bridge_factory.h" | 15 #include "chrome/test/sync/test_http_bridge_factory.h" |
16 | 16 |
17 using browser_sync::ModelSafeRoutingInfo; | 17 using browser_sync::ModelSafeRoutingInfo; |
18 using browser_sync::sessions::ErrorCounters; | 18 using browser_sync::sessions::ErrorCounters; |
| 19 using browser_sync::sessions::SyncSourceInfo; |
19 using browser_sync::sessions::SyncerStatus; | 20 using browser_sync::sessions::SyncerStatus; |
20 using browser_sync::sessions::SyncSessionSnapshot; | 21 using browser_sync::sessions::SyncSessionSnapshot; |
21 using syncable::DirectoryManager; | 22 using syncable::DirectoryManager; |
22 using syncable::ModelType; | 23 using syncable::ModelType; |
23 using syncable::ScopedDirLookup; | 24 using syncable::ScopedDirLookup; |
24 using sync_api::UserShare; | 25 using sync_api::UserShare; |
25 | 26 |
26 ACTION_P(CallOnPaused, core) { | 27 ACTION_P(CallOnPaused, core) { |
27 core->OnPaused(); | 28 core->OnPaused(); |
28 }; | 29 }; |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 syncable::ModelTypeBitSet sync_ended; | 75 syncable::ModelTypeBitSet sync_ended; |
75 ModelSafeRoutingInfo enabled_types; | 76 ModelSafeRoutingInfo enabled_types; |
76 GetModelSafeRoutingInfo(&enabled_types); | 77 GetModelSafeRoutingInfo(&enabled_types); |
77 std::string download_progress_markers[syncable::MODEL_TYPE_COUNT]; | 78 std::string download_progress_markers[syncable::MODEL_TYPE_COUNT]; |
78 for (ModelSafeRoutingInfo::const_iterator i = enabled_types.begin(); | 79 for (ModelSafeRoutingInfo::const_iterator i = enabled_types.begin(); |
79 i != enabled_types.end(); ++i) { | 80 i != enabled_types.end(); ++i) { |
80 sync_ended.set(i->first); | 81 sync_ended.set(i->first); |
81 } | 82 } |
82 core_->HandleSyncCycleCompletedOnFrontendLoop(new SyncSessionSnapshot( | 83 core_->HandleSyncCycleCompletedOnFrontendLoop(new SyncSessionSnapshot( |
83 SyncerStatus(), ErrorCounters(), 0, false, | 84 SyncerStatus(), ErrorCounters(), 0, false, |
84 sync_ended, download_progress_markers, false, false, 0, 0, false)); | 85 sync_ended, download_progress_markers, false, false, 0, 0, false, |
| 86 SyncSourceInfo())); |
85 } | 87 } |
86 | 88 |
87 sync_api::HttpPostProviderFactory* | 89 sync_api::HttpPostProviderFactory* |
88 SyncBackendHostForProfileSyncTest::MakeHttpBridgeFactory( | 90 SyncBackendHostForProfileSyncTest::MakeHttpBridgeFactory( |
89 URLRequestContextGetter* getter) { | 91 URLRequestContextGetter* getter) { |
90 return new browser_sync::TestHttpBridgeFactory; | 92 return new browser_sync::TestHttpBridgeFactory; |
91 } | 93 } |
92 | 94 |
93 void SyncBackendHostForProfileSyncTest::InitCore( | 95 void SyncBackendHostForProfileSyncTest::InitCore( |
94 const Core::DoInitializeOptions& options) { | 96 const Core::DoInitializeOptions& options) { |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 backend_.reset(new browser_sync::SyncBackendHostForProfileSyncTest( | 235 backend_.reset(new browser_sync::SyncBackendHostForProfileSyncTest( |
234 profile(), | 236 profile(), |
235 num_expected_resumes_, num_expected_pauses_, | 237 num_expected_resumes_, num_expected_pauses_, |
236 set_initial_sync_ended_on_init_, | 238 set_initial_sync_ended_on_init_, |
237 synchronous_backend_initialization_)); | 239 synchronous_backend_initialization_)); |
238 } | 240 } |
239 | 241 |
240 std::string TestProfileSyncService::GetLsidForAuthBootstraping() { | 242 std::string TestProfileSyncService::GetLsidForAuthBootstraping() { |
241 return "foo"; | 243 return "foo"; |
242 } | 244 } |
OLD | NEW |