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

Unified Diff: components/tracing/trace_config_file.cc

Issue 1765153002: Update DevTools Tracing.Start to accept trace config as a parameter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: inline enum Created 4 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/trace_event/trace_config_unittest.cc ('k') | content/browser/devtools/protocol/tracing_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/tracing/trace_config_file.cc
diff --git a/components/tracing/trace_config_file.cc b/components/tracing/trace_config_file.cc
index 670bcc9c2064d52257d973c4d7a1a9878812d85b..56e3ea5cf2bcdf429fbfb0eef011b2c6a9526576 100644
--- a/components/tracing/trace_config_file.cc
+++ b/components/tracing/trace_config_file.cc
@@ -11,7 +11,6 @@
#include "base/command_line.h"
#include "base/files/file_util.h"
#include "base/json/json_reader.h"
-#include "base/json/json_writer.h"
#include "base/logging.h"
#include "base/memory/singleton.h"
#include "base/values.h"
@@ -108,9 +107,7 @@ bool TraceConfigFile::ParseTraceConfigFileContent(const std::string& content) {
if (!dict->GetDictionary(kTraceConfigParam, &trace_config_dict))
return false;
- std::string trace_config_str;
- base::JSONWriter::Write(*trace_config_dict, &trace_config_str);
- trace_config_ = base::trace_event::TraceConfig(trace_config_str);
+ trace_config_ = base::trace_event::TraceConfig(*trace_config_dict);
if (!dict->GetInteger(kStartupDurationParam, &startup_duration_))
startup_duration_ = 0;
« no previous file with comments | « base/trace_event/trace_config_unittest.cc ('k') | content/browser/devtools/protocol/tracing_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698