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

Unified Diff: content/browser/devtools/devtools_tracing_handler.cc

Issue 12096115: Update tracing framework to optionally use a ringbuffer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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
« no previous file with comments | « base/debug/trace_event_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/devtools/devtools_tracing_handler.cc
diff --git a/content/browser/devtools/devtools_tracing_handler.cc b/content/browser/devtools/devtools_tracing_handler.cc
index 5d7ff4a1fe268d565a038f9312cb8382d215cd52..5caa2e367333c81d318a34ad84e1fe36385c8fdb 100644
--- a/content/browser/devtools/devtools_tracing_handler.cc
+++ b/content/browser/devtools/devtools_tracing_handler.cc
@@ -28,6 +28,7 @@ const char kCategoriesParam[] = "categories";
const char kTraceOptionsParam[] = "trace-options";
const char kRecordUntilFull[] = "record-until-full";
+const char kRecordContinuously[] = "record-continuously";
} // namespace
@@ -72,10 +73,13 @@ base::debug::TraceLog::Options DevToolsTracingHandler::TraceOptionsFromString(
for (iter = split.begin(); iter != split.end(); ++iter) {
if (*iter == kRecordUntilFull) {
ret |= base::debug::TraceLog::RECORD_UNTIL_FULL;
+ } else if (*iter == kRecordContinuously) {
+ ret |= base::debug::TraceLog::RECORD_CONTINUOUSLY;
}
}
- if (ret == 0)
- ret = base::debug::TraceLog::RECORD_UNTIL_FULL;
+ if (!(ret & base::debug::TraceLog::RECORD_UNTIL_FULL) &&
+ !(ret & base::debug::TraceLog::RECORD_CONTINUOUSLY))
+ ret |= base::debug::TraceLog::RECORD_UNTIL_FULL;
return static_cast<base::debug::TraceLog::Options>(ret);
}
« no previous file with comments | « base/debug/trace_event_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698