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

Unified Diff: components/tracing/common/trace_config_file.cc

Issue 2683913002: Enable startup tracing from command line flags in components/tracing (Closed)
Patch Set: Rebase. Created 3 years, 10 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/common/trace_config_file.cc
diff --git a/components/tracing/browser/trace_config_file.cc b/components/tracing/common/trace_config_file.cc
similarity index 96%
rename from components/tracing/browser/trace_config_file.cc
rename to components/tracing/common/trace_config_file.cc
index 97f8a16810a8ad4e7b33416507acbffde1693d78..180834461f9258bdad778605e8fb3f762d59ebe7 100644
--- a/components/tracing/browser/trace_config_file.cc
+++ b/components/tracing/common/trace_config_file.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "components/tracing/browser/trace_config_file.h"
+#include "components/tracing/common/trace_config_file.h"
#include <stddef.h>
@@ -41,7 +41,7 @@ const char kTraceConfigParam[] = "trace_config";
const char kStartupDurationParam[] = "startup_duration";
const char kResultFileParam[] = "result_file";
-} // namespace
+} // namespace
TraceConfigFile* TraceConfigFile::GetInstance() {
return base::Singleton<TraceConfigFile,
@@ -93,8 +93,7 @@ TraceConfigFile::TraceConfigFile()
DLOG(WARNING) << "Cannot parse the trace config file correctly.";
}
-TraceConfigFile::~TraceConfigFile() {
-}
+TraceConfigFile::~TraceConfigFile() {}
bool TraceConfigFile::ParseTraceConfigFileContent(const std::string& content) {
std::unique_ptr<base::Value> value(base::JSONReader::Read(content));
@@ -111,10 +110,10 @@ bool TraceConfigFile::ParseTraceConfigFileContent(const std::string& content) {
trace_config_ = base::trace_event::TraceConfig(*trace_config_dict);
if (!dict->GetInteger(kStartupDurationParam, &startup_duration_))
- startup_duration_ = 0;
+ startup_duration_ = 0;
if (startup_duration_ < 0)
- startup_duration_ = 0;
+ startup_duration_ = 0;
base::FilePath::StringType result_file_str;
if (dict->GetString(kResultFileParam, &result_file_str))
« no previous file with comments | « components/tracing/common/trace_config_file.h ('k') | components/tracing/common/trace_config_file_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698