OLD | NEW |
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 "base/logging.h" | 8 #include "base/logging.h" |
9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
507 void SyncBackendHostImpl::GetModelSafeRoutingInfo( | 507 void SyncBackendHostImpl::GetModelSafeRoutingInfo( |
508 syncer::ModelSafeRoutingInfo* out) const { | 508 syncer::ModelSafeRoutingInfo* out) const { |
509 if (initialized()) { | 509 if (initialized()) { |
510 CHECK(registrar_.get()); | 510 CHECK(registrar_.get()); |
511 registrar_->GetModelSafeRoutingInfo(out); | 511 registrar_->GetModelSafeRoutingInfo(out); |
512 } else { | 512 } else { |
513 NOTREACHED(); | 513 NOTREACHED(); |
514 } | 514 } |
515 } | 515 } |
516 | 516 |
517 SyncedDeviceTracker* SyncBackendHostImpl::GetSyncedDeviceTracker() const { | |
518 if (!initialized()) | |
519 return NULL; | |
520 return core_->synced_device_tracker(); | |
521 } | |
522 | |
523 void SyncBackendHostImpl::RequestBufferedProtocolEventsAndEnableForwarding() { | 517 void SyncBackendHostImpl::RequestBufferedProtocolEventsAndEnableForwarding() { |
524 registrar_->sync_thread()->message_loop()->PostTask( | 518 registrar_->sync_thread()->message_loop()->PostTask( |
525 FROM_HERE, | 519 FROM_HERE, |
526 base::Bind( | 520 base::Bind( |
527 &SyncBackendHostCore::SendBufferedProtocolEventsAndEnableForwarding, | 521 &SyncBackendHostCore::SendBufferedProtocolEventsAndEnableForwarding, |
528 core_)); | 522 core_)); |
529 } | 523 } |
530 | 524 |
531 void SyncBackendHostImpl::DisableProtocolEventForwarding() { | 525 void SyncBackendHostImpl::DisableProtocolEventForwarding() { |
532 registrar_->sync_thread()->message_loop()->PostTask( | 526 registrar_->sync_thread()->message_loop()->PostTask( |
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
884 | 878 |
885 base::MessageLoop* SyncBackendHostImpl::GetSyncLoopForTesting() { | 879 base::MessageLoop* SyncBackendHostImpl::GetSyncLoopForTesting() { |
886 return registrar_->sync_thread()->message_loop(); | 880 return registrar_->sync_thread()->message_loop(); |
887 } | 881 } |
888 | 882 |
889 } // namespace browser_sync | 883 } // namespace browser_sync |
890 | 884 |
891 #undef SDVLOG | 885 #undef SDVLOG |
892 | 886 |
893 #undef SLOG | 887 #undef SLOG |
OLD | NEW |