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

Side by Side Diff: chrome/browser/sync/glue/sync_backend_host_core.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 | « no previous file | sync/engine/DEPS » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/glue/sync_backend_host_core.h" 5 #include "chrome/browser/sync/glue/sync_backend_host_core.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "chrome/browser/sync/glue/device_info.h" 9 #include "chrome/browser/sync/glue/device_info.h"
10 #include "chrome/browser/sync/glue/invalidation_adapter.h" 10 #include "chrome/browser/sync/glue/invalidation_adapter.h"
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 host_.Call( 359 host_.Call(
360 FROM_HERE, 360 FROM_HERE,
361 &SyncBackendHostImpl::HandleProtocolEventOnFrontendLoop, 361 &SyncBackendHostImpl::HandleProtocolEventOnFrontendLoop,
362 event_clone.release()); 362 event_clone.release());
363 } 363 }
364 } 364 }
365 365
366 void SyncBackendHostCore::DoOnInvalidatorStateChange( 366 void SyncBackendHostCore::DoOnInvalidatorStateChange(
367 syncer::InvalidatorState state) { 367 syncer::InvalidatorState state) {
368 DCHECK_EQ(base::MessageLoop::current(), sync_loop_); 368 DCHECK_EQ(base::MessageLoop::current(), sync_loop_);
369 sync_manager_->OnInvalidatorStateChange(state); 369 sync_manager_->SetInvalidatorEnabled(state == syncer::INVALIDATIONS_ENABLED);
370 } 370 }
371 371
372 void SyncBackendHostCore::DoOnIncomingInvalidation( 372 void SyncBackendHostCore::DoOnIncomingInvalidation(
373 const syncer::ObjectIdInvalidationMap& invalidation_map) { 373 const syncer::ObjectIdInvalidationMap& invalidation_map) {
374 DCHECK_EQ(base::MessageLoop::current(), sync_loop_); 374 DCHECK_EQ(base::MessageLoop::current(), sync_loop_);
375 375
376 syncer::ObjectIdSet ids = invalidation_map.GetObjectIds(); 376 syncer::ObjectIdSet ids = invalidation_map.GetObjectIds();
377 for (syncer::ObjectIdSet::const_iterator ids_it = ids.begin(); 377 for (syncer::ObjectIdSet::const_iterator ids_it = ids.begin();
378 ids_it != ids.end(); 378 ids_it != ids.end();
379 ++ids_it) { 379 ++ids_it) {
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 this, &SyncBackendHostCore::SaveChanges); 741 this, &SyncBackendHostCore::SaveChanges);
742 } 742 }
743 743
744 void SyncBackendHostCore::SaveChanges() { 744 void SyncBackendHostCore::SaveChanges() {
745 DCHECK_EQ(base::MessageLoop::current(), sync_loop_); 745 DCHECK_EQ(base::MessageLoop::current(), sync_loop_);
746 sync_manager_->SaveChanges(); 746 sync_manager_->SaveChanges();
747 } 747 }
748 748
749 } // namespace browser_sync 749 } // namespace browser_sync
750 750
OLDNEW
« no previous file with comments | « no previous file | sync/engine/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698