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

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: 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..810705a71af27f325478301a3448370770710b8b 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",
jbates 2011/11/16 00:46:57 Does this show up OK in about:tracing? BEGIN..END
rlarocque 2011/11/16 01:03:40 That's odd. The results I see in about:tracing se
+ "DataType", ModelTypeToCharPtr(needs_start_[0]->type()));
needs_start_[0]->Start(
NewCallback(this, &DataTypeManagerImpl::TypeStartCallback));
return;
@@ -332,6 +335,9 @@ void DataTypeManagerImpl::TypeStartCallback(
// on the UI thread.
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ TRACE_EVENT_END1("sync", "ModelAssociation",
+ "DataType", ModelTypeToCharPtr(needs_start_[0]->type()));
+
if (state_ == STOPPING) {
// If we reach this callback while stopping, this means that
// DataTypeManager::Stop() was called while the current data type

Powered by Google App Engine
This is Rietveld 408576698