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 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
500 void SyncBackendHostImpl::GetModelSafeRoutingInfo( | 500 void SyncBackendHostImpl::GetModelSafeRoutingInfo( |
501 syncer::ModelSafeRoutingInfo* out) const { | 501 syncer::ModelSafeRoutingInfo* out) const { |
502 if (initialized()) { | 502 if (initialized()) { |
503 CHECK(registrar_.get()); | 503 CHECK(registrar_.get()); |
504 registrar_->GetModelSafeRoutingInfo(out); | 504 registrar_->GetModelSafeRoutingInfo(out); |
505 } else { | 505 } else { |
506 NOTREACHED(); | 506 NOTREACHED(); |
507 } | 507 } |
508 } | 508 } |
509 | 509 |
| 510 void SyncBackendHostImpl::FlushDirectory() const { |
| 511 DCHECK(initialized()); |
| 512 registrar_->sync_thread()->message_loop()->PostTask(FROM_HERE, |
| 513 base::Bind(&SyncBackendHostCore::SaveChanges, core_)); |
| 514 } |
| 515 |
510 void SyncBackendHostImpl::RequestBufferedProtocolEventsAndEnableForwarding() { | 516 void SyncBackendHostImpl::RequestBufferedProtocolEventsAndEnableForwarding() { |
511 registrar_->sync_thread()->message_loop()->PostTask( | 517 registrar_->sync_thread()->message_loop()->PostTask( |
512 FROM_HERE, | 518 FROM_HERE, |
513 base::Bind( | 519 base::Bind( |
514 &SyncBackendHostCore::SendBufferedProtocolEventsAndEnableForwarding, | 520 &SyncBackendHostCore::SendBufferedProtocolEventsAndEnableForwarding, |
515 core_)); | 521 core_)); |
516 } | 522 } |
517 | 523 |
518 void SyncBackendHostImpl::DisableProtocolEventForwarding() { | 524 void SyncBackendHostImpl::DisableProtocolEventForwarding() { |
519 registrar_->sync_thread()->message_loop()->PostTask( | 525 registrar_->sync_thread()->message_loop()->PostTask( |
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
863 | 869 |
864 base::MessageLoop* SyncBackendHostImpl::GetSyncLoopForTesting() { | 870 base::MessageLoop* SyncBackendHostImpl::GetSyncLoopForTesting() { |
865 return registrar_->sync_thread()->message_loop(); | 871 return registrar_->sync_thread()->message_loop(); |
866 } | 872 } |
867 | 873 |
868 } // namespace browser_sync | 874 } // namespace browser_sync |
869 | 875 |
870 #undef SDVLOG | 876 #undef SDVLOG |
871 | 877 |
872 #undef SLOG | 878 #undef SLOG |
OLD | NEW |