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

Unified Diff: base/debug/trace_event.h

Issue 7981004: add classes trace_analyzer::Query and TraceAnalyzer to make it easy to search through trace data (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: moved TestTraceEvent Created 9 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: base/debug/trace_event.h
diff --git a/base/debug/trace_event.h b/base/debug/trace_event.h
index e7b3f90066ac8631099d0f39a8558ec517b7f810..51ab238b80fddd4ca40f2a429151e459284bc50a 100644
--- a/base/debug/trace_event.h
+++ b/base/debug/trace_event.h
@@ -403,6 +403,10 @@ class BASE_EXPORT TraceValue {
return value;
}
+ bool is_string() const {
+ return type_ == TRACE_TYPE_STRING || type_ == TRACE_TYPE_STATIC_STRING;
+ }
+
void AppendAsJSON(std::string* out) const;
Type type() const {
@@ -429,7 +433,7 @@ class BASE_EXPORT TraceValue {
return value_.as_pointer;
}
const char* as_string() const {
- DCHECK(type_ == TRACE_TYPE_STRING || type_ == TRACE_TYPE_STATIC_STRING);
+ DCHECK(is_string());
return value_.as_string;
}
const char** as_assignable_string() {
@@ -469,6 +473,9 @@ class TraceEvent {
bool copy);
~TraceEvent();
+ static const char* GetPhaseStr(TraceEventPhase phase);
+ static TraceEventPhase GetPhase(const char* phase);
+
// Serialize event data to JSON
static void AppendEventsAsJSON(const std::vector<TraceEvent>& events,
size_t start,
« no previous file with comments | « base/base.gypi ('k') | base/debug/trace_event.cc » ('j') | base/debug/trace_event.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698