Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Side by Side Diff: chrome/browser/sync/test_profile_sync_service.h

Issue 6104003: sync: use progress markers instead of timestamps during GetUpdates (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tim's fixes Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #ifndef CHROME_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_ 5 #ifndef CHROME_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_
6 #define CHROME_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_ 6 #define CHROME_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 SetInitialSyncEndedForEnabledTypes(); 132 SetInitialSyncEndedForEnabledTypes();
133 133
134 SyncBackendHost::HandleInitializationCompletedOnFrontendLoop(); 134 SyncBackendHost::HandleInitializationCompletedOnFrontendLoop();
135 } 135 }
136 136
137 // Called when a nudge comes in. 137 // Called when a nudge comes in.
138 void SimulateSyncCycleCompletedInitialSyncEnded() { 138 void SimulateSyncCycleCompletedInitialSyncEnded() {
139 syncable::ModelTypeBitSet sync_ended; 139 syncable::ModelTypeBitSet sync_ended;
140 ModelSafeRoutingInfo enabled_types; 140 ModelSafeRoutingInfo enabled_types;
141 GetModelSafeRoutingInfo(&enabled_types); 141 GetModelSafeRoutingInfo(&enabled_types);
142 std::string download_progress_markers[syncable::MODEL_TYPE_COUNT];
142 for (ModelSafeRoutingInfo::const_iterator i = enabled_types.begin(); 143 for (ModelSafeRoutingInfo::const_iterator i = enabled_types.begin();
143 i != enabled_types.end(); ++i) { 144 i != enabled_types.end(); ++i) {
144 sync_ended.set(i->first); 145 sync_ended.set(i->first);
145 } 146 }
146 core_->HandleSyncCycleCompletedOnFrontendLoop(new SyncSessionSnapshot( 147 core_->HandleSyncCycleCompletedOnFrontendLoop(new SyncSessionSnapshot(
147 SyncerStatus(), ErrorCounters(), 0, 0, false, 148 SyncerStatus(), ErrorCounters(), 0, false,
148 sync_ended, false, false, 0, 0, false)); 149 sync_ended, download_progress_markers, false, false, 0, 0, false));
149 } 150 }
150 151
151 virtual sync_api::HttpPostProviderFactory* MakeHttpBridgeFactory( 152 virtual sync_api::HttpPostProviderFactory* MakeHttpBridgeFactory(
152 URLRequestContextGetter* getter) { 153 URLRequestContextGetter* getter) {
153 return new browser_sync::TestHttpBridgeFactory; 154 return new browser_sync::TestHttpBridgeFactory;
154 } 155 }
155 156
156 virtual void InitCore(const Core::DoInitializeOptions& options) { 157 virtual void InitCore(const Core::DoInitializeOptions& options) {
157 std::wstring user = L"testuser"; 158 std::wstring user = L"testuser";
158 core_loop()->PostTask(FROM_HERE, 159 core_loop()->PostTask(FROM_HERE,
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 bool synchronous_sync_configuration_; 263 bool synchronous_sync_configuration_;
263 bool set_expect_resume_expectations_; 264 bool set_expect_resume_expectations_;
264 int num_expected_resumes_; 265 int num_expected_resumes_;
265 int num_expected_pauses_; 266 int num_expected_pauses_;
266 267
267 scoped_ptr<Task> initial_condition_setup_task_; 268 scoped_ptr<Task> initial_condition_setup_task_;
268 bool set_initial_sync_ended_on_init_; 269 bool set_initial_sync_ended_on_init_;
269 }; 270 };
270 271
271 #endif // CHROME_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_ 272 #endif // CHROME_BROWSER_SYNC_TEST_PROFILE_SYNC_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/sync/syncable/syncable_unittest.cc ('k') | chrome/test/sync/engine/mock_connection_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698