OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/feedback/tracing_manager.h" | 5 #include "components/feedback/tracing_manager.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/memory/ref_counted_memory.h" | 10 #include "base/memory/ref_counted_memory.h" |
11 #include "base/message_loop/message_loop_proxy.h" | 11 #include "base/message_loop/message_loop_proxy.h" |
12 #include "base/prefs/pref_service.h" | 12 #include "components/feedback/feedback_util.h" |
13 #include "chrome/browser/browser_process.h" | |
14 #include "chrome/browser/feedback/feedback_util.h" | |
15 #include "chrome/common/pref_names.h" | |
16 #include "content/public/browser/tracing_controller.h" | 13 #include "content/public/browser/tracing_controller.h" |
17 | 14 |
18 namespace { | 15 namespace { |
19 // Only once trace manager can exist at a time. | 16 // Only once trace manager can exist at a time. |
20 TracingManager* g_tracing_manager = NULL; | 17 TracingManager* g_tracing_manager = NULL; |
21 // Trace IDs start at 1 and increase. | 18 // Trace IDs start at 1 and increase. |
22 int g_next_trace_id = 1; | 19 int g_next_trace_id = 1; |
23 // Name of the file to store the tracing data as. | 20 // Name of the file to store the tracing data as. |
24 const base::FilePath::CharType kTracingFilename[] = | 21 const base::FilePath::CharType kTracingFilename[] = |
25 FILE_PATH_LITERAL("tracing.json"); | 22 FILE_PATH_LITERAL("tracing.json"); |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 // static | 133 // static |
137 scoped_ptr<TracingManager> TracingManager::Create() { | 134 scoped_ptr<TracingManager> TracingManager::Create() { |
138 if (g_tracing_manager) | 135 if (g_tracing_manager) |
139 return scoped_ptr<TracingManager>(); | 136 return scoped_ptr<TracingManager>(); |
140 return scoped_ptr<TracingManager>(new TracingManager()); | 137 return scoped_ptr<TracingManager>(new TracingManager()); |
141 } | 138 } |
142 | 139 |
143 TracingManager* TracingManager::Get() { | 140 TracingManager* TracingManager::Get() { |
144 return g_tracing_manager; | 141 return g_tracing_manager; |
145 } | 142 } |
OLD | NEW |