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

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

Issue 8573011: Event tracing for sync events (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix line length issues Created 9 years, 1 month 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 2d49be4b85407ad635ab8ebf14ccba40aa9b8796..341b27357989fe30dfd3e97439582a8d8e209663 100644
--- a/chrome/browser/sync/glue/data_type_manager_impl.cc
+++ b/chrome/browser/sync/glue/data_type_manager_impl.cc
@@ -10,6 +10,7 @@
#include "base/bind.h"
#include "base/callback.h"
#include "base/compiler_specific.h"
+#include "base/debug/trace_event.h"
#include "base/logging.h"
#include "base/message_loop.h"
#include "base/metrics/histogram.h"
@@ -293,6 +294,8 @@ void DataTypeManagerImpl::StartNextType() {
// front of the list.
if (!needs_start_.empty()) {
VLOG(1) << "Starting " << needs_start_[0]->name();
+ TRACE_EVENT_BEGIN1("sync", "ModelAssociation",
+ "DataType", ModelTypeToString(needs_start_[0]->type()));
needs_start_[0]->Start(
NewCallback(this, &DataTypeManagerImpl::TypeStartCallback));
return;
@@ -332,6 +335,8 @@ void DataTypeManagerImpl::TypeStartCallback(
// on the UI thread.
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ TRACE_EVENT_END0("sync", "ModelAssociation");
+
if (state_ == STOPPING) {
// If we reach this callback while stopping, this means that
// DataTypeManager::Stop() was called while the current data type
« no previous file with comments | « chrome/browser/sync/failed_datatypes_handler.cc ('k') | chrome/browser/sync/profile_sync_service_harness.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698