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

Side by Side Diff: sync/tools/sync_client.cc

Issue 377413003: Remove most remaining sync/notifier dependencies (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Attempt to fix win compile Created 6 years, 5 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/sync_notifier.gypi ('k') | no next file » | 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) 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 <cstddef> 5 #include <cstddef>
6 #include <cstdio> 6 #include <cstdio>
7 #include <string> 7 #include <string>
8 8
9 #include "base/at_exit.h" 9 #include "base/at_exit.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 private: 214 private:
215 syncer::Invalidation invalidation_; 215 syncer::Invalidation invalidation_;
216 }; 216 };
217 217
218 class InvalidatorShim : public InvalidationHandler { 218 class InvalidatorShim : public InvalidationHandler {
219 public: 219 public:
220 explicit InvalidatorShim(SyncManager* sync_manager) 220 explicit InvalidatorShim(SyncManager* sync_manager)
221 : sync_manager_(sync_manager) {} 221 : sync_manager_(sync_manager) {}
222 222
223 virtual void OnInvalidatorStateChange(InvalidatorState state) OVERRIDE { 223 virtual void OnInvalidatorStateChange(InvalidatorState state) OVERRIDE {
224 sync_manager_->OnInvalidatorStateChange(state); 224 sync_manager_->SetInvalidatorEnabled(state == INVALIDATIONS_ENABLED);
225 } 225 }
226 226
227 virtual void OnIncomingInvalidation( 227 virtual void OnIncomingInvalidation(
228 const ObjectIdInvalidationMap& invalidation_map) OVERRIDE { 228 const ObjectIdInvalidationMap& invalidation_map) OVERRIDE {
229 syncer::ObjectIdSet ids = invalidation_map.GetObjectIds(); 229 syncer::ObjectIdSet ids = invalidation_map.GetObjectIds();
230 for (syncer::ObjectIdSet::const_iterator ids_it = ids.begin(); 230 for (syncer::ObjectIdSet::const_iterator ids_it = ids.begin();
231 ids_it != ids.end(); 231 ids_it != ids.end();
232 ++ids_it) { 232 ++ids_it) {
233 syncer::ModelType type; 233 syncer::ModelType type;
234 if (!NotificationTypeToRealModelType(ids_it->name(), &type)) { 234 if (!NotificationTypeToRealModelType(ids_it->name(), &type)) {
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 io_thread.Stop(); 464 io_thread.Stop();
465 return 0; 465 return 0;
466 } 466 }
467 467
468 } // namespace 468 } // namespace
469 } // namespace syncer 469 } // namespace syncer
470 470
471 int main(int argc, char* argv[]) { 471 int main(int argc, char* argv[]) {
472 return syncer::SyncClientMain(argc, argv); 472 return syncer::SyncClientMain(argc, argv);
473 } 473 }
OLDNEW
« no previous file with comments | « sync/sync_notifier.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698