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

Side by Side Diff: content/browser/tracing/tracing_controller_impl.cc

Issue 1427063002: Tracing: Add metadata indicating whether we have a high-resolution clock available (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « base/trace_event/trace_event.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #include "content/browser/tracing/tracing_controller_impl.h" 4 #include "content/browser/tracing/tracing_controller_impl.h"
5 5
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/files/file_util.h" 7 #include "base/files/file_util.h"
8 #include "base/json/string_escape.h" 8 #include "base/json/string_escape.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 } 160 }
161 161
162 return true; 162 return true;
163 } 163 }
164 164
165 void TracingControllerImpl::OnEnableRecordingDone( 165 void TracingControllerImpl::OnEnableRecordingDone(
166 const TraceConfig& trace_config, 166 const TraceConfig& trace_config,
167 const EnableRecordingDoneCallback& callback) { 167 const EnableRecordingDoneCallback& callback) {
168 DCHECK_CURRENTLY_ON(BrowserThread::UI); 168 DCHECK_CURRENTLY_ON(BrowserThread::UI);
169 169
170 TRACE_EVENT_API_ADD_METADATA_EVENT("IsTimeTicksHighResolution", "value",
171 base::TimeTicks::IsHighResolution());
172
170 // Notify all child processes. 173 // Notify all child processes.
171 for (TraceMessageFilterSet::iterator it = trace_message_filters_.begin(); 174 for (TraceMessageFilterSet::iterator it = trace_message_filters_.begin();
172 it != trace_message_filters_.end(); ++it) { 175 it != trace_message_filters_.end(); ++it) {
173 it->get()->SendBeginTracing(trace_config); 176 it->get()->SendBeginTracing(trace_config);
174 } 177 }
175 178
176 if (!callback.is_null()) 179 if (!callback.is_null())
177 callback.Run(); 180 callback.Run();
178 } 181 }
179 182
(...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after
937 is_monitoring_ = is_monitoring; 940 is_monitoring_ = is_monitoring;
938 #if !defined(OS_ANDROID) 941 #if !defined(OS_ANDROID)
939 for (std::set<TracingUI*>::iterator it = tracing_uis_.begin(); 942 for (std::set<TracingUI*>::iterator it = tracing_uis_.begin();
940 it != tracing_uis_.end(); it++) { 943 it != tracing_uis_.end(); it++) {
941 (*it)->OnMonitoringStateChanged(is_monitoring); 944 (*it)->OnMonitoringStateChanged(is_monitoring);
942 } 945 }
943 #endif 946 #endif
944 } 947 }
945 948
946 } // namespace content 949 } // namespace content
OLDNEW
« no previous file with comments | « base/trace_event/trace_event.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698