| 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 "base/profiler/scoped_tracker.h" | 9 #include "base/profiler/scoped_tracker.h" |
| 10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
| (...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 635 FROM_HERE_WITH_EXPLICIT_FUNCTION( | 635 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
| 636 "458406 SyncBackendHostImpl::FinishConfigureDataTOFL::ReadyTask")); | 636 "458406 SyncBackendHostImpl::FinishConfigureDataTOFL::ReadyTask")); |
| 637 if (!ready_task.is_null()) | 637 if (!ready_task.is_null()) |
| 638 ready_task.Run(succeeded_configuration_types, failed_configuration_types); | 638 ready_task.Run(succeeded_configuration_types, failed_configuration_types); |
| 639 } | 639 } |
| 640 | 640 |
| 641 void SyncBackendHostImpl::Observe( | 641 void SyncBackendHostImpl::Observe( |
| 642 int type, | 642 int type, |
| 643 const content::NotificationSource& source, | 643 const content::NotificationSource& source, |
| 644 const content::NotificationDetails& details) { | 644 const content::NotificationDetails& details) { |
| 645 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); | 645 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
| 646 DCHECK_EQ(type, chrome::NOTIFICATION_SYNC_REFRESH_LOCAL); | 646 DCHECK_EQ(type, chrome::NOTIFICATION_SYNC_REFRESH_LOCAL); |
| 647 | 647 |
| 648 content::Details<const syncer::ModelTypeSet> state_details(details); | 648 content::Details<const syncer::ModelTypeSet> state_details(details); |
| 649 const syncer::ModelTypeSet& types = *(state_details.ptr()); | 649 const syncer::ModelTypeSet& types = *(state_details.ptr()); |
| 650 registrar_->sync_thread()->message_loop()->PostTask(FROM_HERE, | 650 registrar_->sync_thread()->message_loop()->PostTask(FROM_HERE, |
| 651 base::Bind(&SyncBackendHostCore::DoRefreshTypes, core_.get(), types)); | 651 base::Bind(&SyncBackendHostCore::DoRefreshTypes, core_.get(), types)); |
| 652 } | 652 } |
| 653 | 653 |
| 654 void SyncBackendHostImpl::AddExperimentalTypes() { | 654 void SyncBackendHostImpl::AddExperimentalTypes() { |
| 655 CHECK(initialized()); | 655 CHECK(initialized()); |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 895 | 895 |
| 896 base::MessageLoop* SyncBackendHostImpl::GetSyncLoopForTesting() { | 896 base::MessageLoop* SyncBackendHostImpl::GetSyncLoopForTesting() { |
| 897 return registrar_->sync_thread()->message_loop(); | 897 return registrar_->sync_thread()->message_loop(); |
| 898 } | 898 } |
| 899 | 899 |
| 900 } // namespace browser_sync | 900 } // namespace browser_sync |
| 901 | 901 |
| 902 #undef SDVLOG | 902 #undef SDVLOG |
| 903 | 903 |
| 904 #undef SLOG | 904 #undef SLOG |
| OLD | NEW |