| 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/chrome_notification_types.h" | 9 #include "chrome/browser/chrome_notification_types.h" |
| 10 #include "chrome/browser/invalidation/invalidation_service.h" | 10 #include "chrome/browser/invalidation/invalidation_service.h" |
| (...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 } | 478 } |
| 479 } | 479 } |
| 480 | 480 |
| 481 SyncedDeviceTracker* SyncBackendHostImpl::GetSyncedDeviceTracker() const { | 481 SyncedDeviceTracker* SyncBackendHostImpl::GetSyncedDeviceTracker() const { |
| 482 if (!initialized()) | 482 if (!initialized()) |
| 483 return NULL; | 483 return NULL; |
| 484 return core_->synced_device_tracker(); | 484 return core_->synced_device_tracker(); |
| 485 } | 485 } |
| 486 | 486 |
| 487 void SyncBackendHostImpl::RequestBufferedProtocolEventsAndEnableForwarding() { | 487 void SyncBackendHostImpl::RequestBufferedProtocolEventsAndEnableForwarding() { |
| 488 DCHECK(initialized()); | |
| 489 registrar_->sync_thread()->message_loop()->PostTask( | 488 registrar_->sync_thread()->message_loop()->PostTask( |
| 490 FROM_HERE, | 489 FROM_HERE, |
| 491 base::Bind( | 490 base::Bind( |
| 492 &SyncBackendHostCore::SendBufferedProtocolEventsAndEnableForwarding, | 491 &SyncBackendHostCore::SendBufferedProtocolEventsAndEnableForwarding, |
| 493 core_)); | 492 core_)); |
| 494 } | 493 } |
| 495 | 494 |
| 496 void SyncBackendHostImpl::DisableProtocolEventForwarding() { | 495 void SyncBackendHostImpl::DisableProtocolEventForwarding() { |
| 497 DCHECK(initialized()); | |
| 498 registrar_->sync_thread()->message_loop()->PostTask( | 496 registrar_->sync_thread()->message_loop()->PostTask( |
| 499 FROM_HERE, | 497 FROM_HERE, |
| 500 base::Bind( | 498 base::Bind( |
| 501 &SyncBackendHostCore::DisableProtocolEventForwarding, | 499 &SyncBackendHostCore::DisableProtocolEventForwarding, |
| 502 core_)); | 500 core_)); |
| 503 } | 501 } |
| 504 | 502 |
| 505 void SyncBackendHostImpl::GetAllNodesForTypes( | 503 void SyncBackendHostImpl::GetAllNodesForTypes( |
| 506 syncer::ModelTypeSet types, | 504 syncer::ModelTypeSet types, |
| 507 base::Callback<void(const std::vector<syncer::ModelType>&, | 505 base::Callback<void(const std::vector<syncer::ModelType>&, |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 801 base::MessageLoop* SyncBackendHostImpl::GetSyncLoopForTesting() { | 799 base::MessageLoop* SyncBackendHostImpl::GetSyncLoopForTesting() { |
| 802 return registrar_->sync_thread()->message_loop(); | 800 return registrar_->sync_thread()->message_loop(); |
| 803 } | 801 } |
| 804 | 802 |
| 805 } // namespace browser_sync | 803 } // namespace browser_sync |
| 806 | 804 |
| 807 #undef SDVLOG | 805 #undef SDVLOG |
| 808 | 806 |
| 809 #undef SLOG | 807 #undef SLOG |
| 810 | 808 |
| OLD | NEW |