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

Side by Side Diff: chrome/browser/sync/glue/sync_backend_host_impl.cc

Issue 212603007: sync: Buffer Protocol Events for about:sync page (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 8 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 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_impl.h" 5 #include "chrome/browser/sync/glue/sync_backend_host_impl.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/chrome_notification_types.h" 8 #include "chrome/browser/chrome_notification_types.h"
9 #include "chrome/browser/invalidation/invalidation_service.h" 9 #include "chrome/browser/invalidation/invalidation_service.h"
10 #include "chrome/browser/invalidation/invalidation_service_factory.h" 10 #include "chrome/browser/invalidation/invalidation_service_factory.h"
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 NOTREACHED(); 468 NOTREACHED();
469 } 469 }
470 } 470 }
471 471
472 SyncedDeviceTracker* SyncBackendHostImpl::GetSyncedDeviceTracker() const { 472 SyncedDeviceTracker* SyncBackendHostImpl::GetSyncedDeviceTracker() const {
473 if (!initialized()) 473 if (!initialized())
474 return NULL; 474 return NULL;
475 return core_->synced_device_tracker(); 475 return core_->synced_device_tracker();
476 } 476 }
477 477
478 void SyncBackendHostImpl::SetForwardProtocolEvents(bool forward) { 478 void SyncBackendHostImpl::RequestBufferedProtocolEventsAndEnableForwarding() {
479 DCHECK(initialized()); 479 DCHECK(initialized());
480 registrar_->sync_thread()->message_loop()->PostTask( 480 registrar_->sync_thread()->message_loop()->PostTask(
481 FROM_HERE, 481 FROM_HERE,
482 base::Bind(&SyncBackendHostCore::SetForwardProtocolEvents, 482 base::Bind(
483 core_, forward)); 483 &SyncBackendHostCore::SendBufferedProtocolEventsAndEnableForwarding,
484 core_));
485 }
486
487 void SyncBackendHostImpl::DisableProtocolEventForwarding() {
488 DCHECK(initialized());
489 registrar_->sync_thread()->message_loop()->PostTask(
490 FROM_HERE,
491 base::Bind(
492 &SyncBackendHostCore::DisableProtocolEventForwarding,
493 core_));
484 } 494 }
485 495
486 void SyncBackendHostImpl::InitCore(scoped_ptr<DoInitializeOptions> options) { 496 void SyncBackendHostImpl::InitCore(scoped_ptr<DoInitializeOptions> options) {
487 registrar_->sync_thread()->message_loop()->PostTask(FROM_HERE, 497 registrar_->sync_thread()->message_loop()->PostTask(FROM_HERE,
488 base::Bind(&SyncBackendHostCore::DoInitialize, 498 base::Bind(&SyncBackendHostCore::DoInitialize,
489 core_.get(), base::Passed(&options))); 499 core_.get(), base::Passed(&options)));
490 } 500 }
491 501
492 void SyncBackendHostImpl::RequestConfigureSyncer( 502 void SyncBackendHostImpl::RequestConfigureSyncer(
493 syncer::ConfigureReason reason, 503 syncer::ConfigureReason reason,
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
764 base::MessageLoop* SyncBackendHostImpl::GetSyncLoopForTesting() { 774 base::MessageLoop* SyncBackendHostImpl::GetSyncLoopForTesting() {
765 return registrar_->sync_thread()->message_loop(); 775 return registrar_->sync_thread()->message_loop();
766 } 776 }
767 777
768 } // namespace browser_sync 778 } // namespace browser_sync
769 779
770 #undef SDVLOG 780 #undef SDVLOG
771 781
772 #undef SLOG 782 #undef SLOG
773 783
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/sync_backend_host_impl.h ('k') | chrome/browser/sync/glue/sync_backend_host_mock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698