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

Side by Side Diff: chrome/browser/sync/engine/syncer_end_command.cc

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
« no previous file with comments | « chrome/browser/sync/engine/syncapi.cc ('k') | chrome/browser/sync/engine/syncer_proto_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/engine/syncer_end_command.h" 5 #include "chrome/browser/sync/engine/syncer_end_command.h"
6 6
7 #include "chrome/browser/sync/engine/syncer_types.h" 7 #include "chrome/browser/sync/engine/syncer_types.h"
8 #include "chrome/browser/sync/sessions/sync_session.h" 8 #include "chrome/browser/sync/sessions/sync_session.h"
9 #include "chrome/browser/sync/syncable/directory_manager.h" 9 #include "chrome/browser/sync/syncable/directory_manager.h"
10 #include "chrome/common/deprecated/event_sys-inl.h" 10 #include "chrome/common/deprecated/event_sys-inl.h"
(...skipping 16 matching lines...) Expand all
27 status->ServerSaysNothingMoreToDownload()) { 27 status->ServerSaysNothingMoreToDownload()) {
28 syncable::ScopedDirLookup dir(session->context()->directory_manager(), 28 syncable::ScopedDirLookup dir(session->context()->directory_manager(),
29 session->context()->account_name()); 29 session->context()->account_name());
30 if (!dir.good()) { 30 if (!dir.good()) {
31 LOG(ERROR) << "Scoped dir lookup failed!"; 31 LOG(ERROR) << "Scoped dir lookup failed!";
32 return; 32 return;
33 } 33 }
34 34
35 for (int i = 0; i < syncable::MODEL_TYPE_COUNT; ++i) { 35 for (int i = 0; i < syncable::MODEL_TYPE_COUNT; ++i) {
36 syncable::ModelType model_type = syncable::ModelTypeFromInt(i); 36 syncable::ModelType model_type = syncable::ModelTypeFromInt(i);
37 if (status->updates_request_parameters().data_types[i]) { 37 if (status->updates_request_types()[i]) {
38 // This gets persisted to the directory's backing store. 38 // This gets persisted to the directory's backing store.
39 dir->set_initial_sync_ended_for_type(model_type, true); 39 dir->set_initial_sync_ended_for_type(model_type, true);
40 } 40 }
41 } 41 }
42 } 42 }
43 43
44 SyncEngineEvent event(SyncEngineEvent::SYNC_CYCLE_ENDED); 44 SyncEngineEvent event(SyncEngineEvent::SYNC_CYCLE_ENDED);
45 sessions::SyncSessionSnapshot snapshot(session->TakeSnapshot()); 45 sessions::SyncSessionSnapshot snapshot(session->TakeSnapshot());
46 event.snapshot = &snapshot; 46 event.snapshot = &snapshot;
47 session->context()->NotifyListeners(event); 47 session->context()->NotifyListeners(event);
48 } 48 }
49 49
50 } // namespace browser_sync 50 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/engine/syncapi.cc ('k') | chrome/browser/sync/engine/syncer_proto_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698