Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Side by Side Diff: chrome/browser/sync/glue/sync_backend_host_impl.cc

Issue 925673003: Add profiling for FinishConfigureDataTypesOnFrontendLoop (sync). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | components/sync_driver/data_type_manager_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 crbug.com/458406 is fixed.
613 tracked_objects::ScopedTracker tracking_profile1(
614 FROM_HERE_WITH_EXPLICIT_FUNCTION(
615 "458406 SyncBackendHostImpl::"
vadimt 2015/02/13 15:22:57 You can't split this string into 2 lines. Our sour
erikchen 2015/02/13 23:28:39 Done.
616 "FinishConfigureDataTypesOnFrontendLoop"));
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 crbug.com/458406 is fixed.
627 tracked_objects::ScopedTracker tracking_profile2(
628 FROM_HERE_WITH_EXPLICIT_FUNCTION(
629 "458406 SyncBackendHostImpl::"
630 "FinishConfigureDataTypesOnFrontendLoop::ReadyTask"));
vadimt 2015/02/13 15:22:57 same
erikchen 2015/02/13 23:28:39 Done.
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
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
OLDNEW
« no previous file with comments | « no previous file | components/sync_driver/data_type_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698