| 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 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 602 ready_task, | 602 ready_task, |
| 603 retry_callback)); | 603 retry_callback)); |
| 604 } | 604 } |
| 605 | 605 |
| 606 void SyncBackendHostImpl::FinishConfigureDataTypesOnFrontendLoop( | 606 void SyncBackendHostImpl::FinishConfigureDataTypesOnFrontendLoop( |
| 607 const syncer::ModelTypeSet enabled_types, | 607 const syncer::ModelTypeSet enabled_types, |
| 608 const syncer::ModelTypeSet succeeded_configuration_types, | 608 const syncer::ModelTypeSet succeeded_configuration_types, |
| 609 const syncer::ModelTypeSet failed_configuration_types, | 609 const syncer::ModelTypeSet failed_configuration_types, |
| 610 const base::Callback<void(syncer::ModelTypeSet, | 610 const base::Callback<void(syncer::ModelTypeSet, |
| 611 syncer::ModelTypeSet)>& ready_task) { | 611 syncer::ModelTypeSet)>& ready_task) { |
| 612 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/458406 is |
| 613 // fixed. |
| 614 tracked_objects::ScopedTracker tracking_profile1( |
| 615 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
| 616 "458406 SyncBackendHostImpl::FinishConfigureDataTOFL")); |
| 612 if (!frontend_) | 617 if (!frontend_) |
| 613 return; | 618 return; |
| 614 | 619 |
| 615 if (invalidator_) { | 620 if (invalidator_) { |
| 616 invalidator_->UpdateRegisteredInvalidationIds( | 621 invalidator_->UpdateRegisteredInvalidationIds( |
| 617 this, | 622 this, |
| 618 ModelTypeSetToObjectIdSet(enabled_types)); | 623 ModelTypeSetToObjectIdSet(enabled_types)); |
| 619 } | 624 } |
| 620 | 625 |
| 626 // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/458406 is |
| 627 // fixed. |
| 628 tracked_objects::ScopedTracker tracking_profile2( |
| 629 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
| 630 "458406 SyncBackendHostImpl::FinishConfigureDataTOFL::ReadyTask")); |
| 621 if (!ready_task.is_null()) | 631 if (!ready_task.is_null()) |
| 622 ready_task.Run(succeeded_configuration_types, failed_configuration_types); | 632 ready_task.Run(succeeded_configuration_types, failed_configuration_types); |
| 623 } | 633 } |
| 624 | 634 |
| 625 void SyncBackendHostImpl::Observe( | 635 void SyncBackendHostImpl::Observe( |
| 626 int type, | 636 int type, |
| 627 const content::NotificationSource& source, | 637 const content::NotificationSource& source, |
| 628 const content::NotificationDetails& details) { | 638 const content::NotificationDetails& details) { |
| 629 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); | 639 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); |
| 630 DCHECK_EQ(type, chrome::NOTIFICATION_SYNC_REFRESH_LOCAL); | 640 DCHECK_EQ(type, chrome::NOTIFICATION_SYNC_REFRESH_LOCAL); |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 879 | 889 |
| 880 base::MessageLoop* SyncBackendHostImpl::GetSyncLoopForTesting() { | 890 base::MessageLoop* SyncBackendHostImpl::GetSyncLoopForTesting() { |
| 881 return registrar_->sync_thread()->message_loop(); | 891 return registrar_->sync_thread()->message_loop(); |
| 882 } | 892 } |
| 883 | 893 |
| 884 } // namespace browser_sync | 894 } // namespace browser_sync |
| 885 | 895 |
| 886 #undef SDVLOG | 896 #undef SDVLOG |
| 887 | 897 |
| 888 #undef SLOG | 898 #undef SLOG |
| OLD | NEW |