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

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: review fix for primiano and petrcermak's comments 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
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..e0d0883ebadcfa1c221c101467a0262a3e03747c 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,8 @@ 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);
+ DCHECK(trace_config_dict);
Primiano Tucci (use gerrit) 2016/03/15 12:22:41 If you dereference a ptr there is no point adding
Zhen Wang 2016/03/15 16:53:55 I see. removed.
+ trace_config_ = base::trace_event::TraceConfig(*trace_config_dict);
if (!dict->GetInteger(kStartupDurationParam, &startup_duration_))
startup_duration_ = 0;

Powered by Google App Engine
This is Rietveld 408576698