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

Side by Side Diff: components/tracing/trace_config_file.cc

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/tracing/trace_config_file.h" 5 #include "components/tracing/trace_config_file.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 23 matching lines...) Expand all
34 FILE_PATH_LITERAL("chrometrace.log"); 34 FILE_PATH_LITERAL("chrometrace.log");
35 35
36 // String parameters that can be used to parse the trace config file content. 36 // String parameters that can be used to parse the trace config file content.
37 const char kTraceConfigParam[] = "trace_config"; 37 const char kTraceConfigParam[] = "trace_config";
38 const char kStartupDurationParam[] = "startup_duration"; 38 const char kStartupDurationParam[] = "startup_duration";
39 const char kResultFileParam[] = "result_file"; 39 const char kResultFileParam[] = "result_file";
40 40
41 } // namespace 41 } // namespace
42 42
43 TraceConfigFile* TraceConfigFile::GetInstance() { 43 TraceConfigFile* TraceConfigFile::GetInstance() {
44 return Singleton<TraceConfigFile, 44 return base::Singleton<TraceConfigFile,
45 DefaultSingletonTraits<TraceConfigFile>>::get(); 45 base::DefaultSingletonTraits<TraceConfigFile>>::get();
46 } 46 }
47 47
48 TraceConfigFile::TraceConfigFile() 48 TraceConfigFile::TraceConfigFile()
49 : is_enabled_(false), 49 : is_enabled_(false),
50 trace_config_(base::trace_event::TraceConfig()), 50 trace_config_(base::trace_event::TraceConfig()),
51 startup_duration_(0), 51 startup_duration_(0),
52 result_file_(kDefaultResultFile) { 52 result_file_(kDefaultResultFile) {
53 #if defined(OS_ANDROID) 53 #if defined(OS_ANDROID)
54 base::FilePath trace_config_file(kAndroidTraceConfigFile); 54 base::FilePath trace_config_file(kAndroidTraceConfigFile);
55 #else 55 #else
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 } 131 }
132 132
133 #if !defined(OS_ANDROID) 133 #if !defined(OS_ANDROID)
134 base::FilePath TraceConfigFile::GetResultFile() const { 134 base::FilePath TraceConfigFile::GetResultFile() const {
135 DCHECK(IsEnabled()); 135 DCHECK(IsEnabled());
136 return result_file_; 136 return result_file_;
137 } 137 }
138 #endif 138 #endif
139 139
140 } // namespace tracing 140 } // namespace tracing
OLDNEW
« no previous file with comments | « components/tracing/trace_config_file.h ('k') | components/translate/core/browser/translate_download_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698