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

Unified Diff: chrome/browser/sync/glue/data_type_manager_impl.cc

Issue 23866012: Send configuration stats together at the end of data type configuration so that (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/glue/data_type_manager_impl.cc
diff --git a/chrome/browser/sync/glue/data_type_manager_impl.cc b/chrome/browser/sync/glue/data_type_manager_impl.cc
index c5cbc8ef830a6418d2cb1369355b19970cff6352..3fe7e05e770378fd6cfbb228cf78f4134ce785cd 100644
--- a/chrome/browser/sync/glue/data_type_manager_impl.cc
+++ b/chrome/browser/sync/glue/data_type_manager_impl.cc
@@ -377,30 +377,25 @@ void DataTypeManagerImpl::OnSingleDataTypeAssociationDone(
if (!debug_info_listener_.IsInitialized())
return;
- syncer::DataTypeConfigurationStats configuration_stats;
- configuration_stats.model_type = type;
- configuration_stats.association_stats = association_stats;
+ configuration_stats_.push_back(syncer::DataTypeConfigurationStats());
+ configuration_stats_.back().model_type = type;
+ configuration_stats_.back().association_stats = association_stats;
AssociationTypesInfo& info = association_types_queue_.front();
- configuration_stats.download_wait_time =
+ configuration_stats_.back().download_wait_time =
info.download_start_time - last_restart_time_;
if (info.first_sync_types.Has(type)) {
- configuration_stats.download_time =
+ configuration_stats_.back().download_time =
info.download_ready_time - info.download_start_time;
}
- configuration_stats.association_wait_time_for_high_priority =
+ configuration_stats_.back().association_wait_time_for_high_priority =
info.association_request_time - info.download_ready_time;
- configuration_stats.high_priority_types_configured_before =
+ configuration_stats_.back().high_priority_types_configured_before =
info.high_priority_types_before;
- configuration_stats.same_priority_types_configured_before =
+ configuration_stats_.back().same_priority_types_configured_before =
info.configured_types;
info.configured_types.Put(type);
-
- debug_info_listener_.Call(
- FROM_HERE,
- &syncer::DataTypeDebugInfoListener::OnSingleDataTypeConfigureComplete,
- configuration_stats);
}
void DataTypeManagerImpl::OnModelAssociationDone(
@@ -547,6 +542,14 @@ void DataTypeManagerImpl::NotifyDone(const ConfigureResult& result) {
DVLOG(1) << "NotifyDone called with result: OK";
UMA_HISTOGRAM_LONG_TIMES("Sync.ConfigureTime_Long.OK",
configure_time_delta_);
+ if (debug_info_listener_.IsInitialized() &&
+ !configuration_stats_.empty()) {
+ debug_info_listener_.Call(
+ FROM_HERE,
+ &syncer::DataTypeDebugInfoListener::OnDataTypeConfigureComplete,
+ configuration_stats_);
+ }
+ configuration_stats_.clear();
break;
case DataTypeManager::ABORTED:
DVLOG(1) << "NotifyDone called with result: ABORTED";
« no previous file with comments | « chrome/browser/sync/glue/data_type_manager_impl.h ('k') | chrome/browser/sync/profile_sync_service_autofill_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698