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

Side by Side Diff: sync/engine/get_updates_processor.cc

Issue 161253002: sync: Add interfaces for per-type sync (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Another win compile fix Created 6 years, 10 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 | « sync/engine/get_updates_processor.h ('k') | sync/engine/sync_directory_commit_contribution.h » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "sync/engine/get_updates_processor.h" 5 #include "sync/engine/get_updates_processor.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "sync/engine/get_updates_delegate.h" 9 #include "sync/engine/get_updates_delegate.h"
10 #include "sync/engine/sync_directory_update_handler.h" 10 #include "sync/engine/update_handler.h"
11 #include "sync/protocol/sync.pb.h" 11 #include "sync/protocol/sync.pb.h"
12 12
13 typedef std::vector<const sync_pb::SyncEntity*> SyncEntityList;
14 typedef std::map<syncer::ModelType, SyncEntityList> TypeSyncEntityMap;
15
13 namespace syncer { 16 namespace syncer {
14 17
15 typedef std::map<ModelType, size_t> TypeToIndexMap; 18 typedef std::map<ModelType, size_t> TypeToIndexMap;
16 19
17 namespace { 20 namespace {
18 21
19 // Given a GetUpdates response, iterates over all the returned items and 22 // Given a GetUpdates response, iterates over all the returned items and
20 // divides them according to their type. Outputs a map from model types to 23 // divides them according to their type. Outputs a map from model types to
21 // received SyncEntities. The output map will have entries (possibly empty) 24 // received SyncEntities. The output map will have entries (possibly empty)
22 // for all types in |requested_types|. 25 // for all types in |requested_types|.
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 142
140 return true; 143 return true;
141 } 144 }
142 145
143 void GetUpdatesProcessor::ApplyUpdates( 146 void GetUpdatesProcessor::ApplyUpdates(
144 sessions::StatusController* status_controller) { 147 sessions::StatusController* status_controller) {
145 delegate_.ApplyUpdates(status_controller, update_handler_map_); 148 delegate_.ApplyUpdates(status_controller, update_handler_map_);
146 } 149 }
147 150
148 } // namespace syncer 151 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/engine/get_updates_processor.h ('k') | sync/engine/sync_directory_commit_contribution.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698