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

Unified Diff: content/browser/trace_controller.cc

Issue 6862002: Merge gpu_trace_event back into base/debug/trace_event (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes for latest siggi review; merge with r83927 Created 9 years, 8 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: content/browser/trace_controller.cc
diff --git a/content/browser/trace_controller.cc b/content/browser/trace_controller.cc
index 5bf2efabe8edcc7064454a10ac1496eebdd40ab0..2262d0045fbe5053305a3bb5dcaa5329b439932e 100644
--- a/content/browser/trace_controller.cc
+++ b/content/browser/trace_controller.cc
@@ -4,11 +4,11 @@
#include "content/browser/trace_controller.h"
+#include "base/debug/trace_event.h"
#include "base/task.h"
#include "content/browser/browser_message_filter.h"
#include "content/browser/trace_message_filter.h"
#include "content/common/child_process_messages.h"
-#include "gpu/common/gpu_trace_event.h"
TraceController::TraceController() :
@@ -17,12 +17,12 @@ TraceController::TraceController() :
pending_bpf_ack_count_(0),
maximum_bpf_(0.0f),
is_tracing_(false) {
- gpu::TraceLog::GetInstance()->SetOutputCallback(
+ base::debug::TraceLog::GetInstance()->SetOutputCallback(
NewCallback(this, &TraceController::OnTraceDataCollected));
}
TraceController::~TraceController() {
- gpu::TraceLog::GetInstance()->SetOutputCallback(NULL);
+ base::debug::TraceLog::GetInstance()->SetOutputCallback(NULL);
}
//static
@@ -41,7 +41,7 @@ bool TraceController::BeginTracing(TraceSubscriber* subscriber) {
// Enable tracing
is_tracing_ = true;
- gpu::TraceLog::GetInstance()->SetEnabled(true);
+ base::debug::TraceLog::GetInstance()->SetEnabled(true);
// Notify all child processes.
for (FilterMap::iterator it = filters_.begin(); it != filters_.end(); ++it) {
@@ -92,7 +92,7 @@ bool TraceController::GetTraceBufferPercentFullAsync(
// Handle special case of zero child processes.
if (pending_bpf_ack_count_ == 1) {
// Ack asynchronously now, because we don't have any children to wait for.
- float bpf = gpu::TraceLog::GetInstance()->GetBufferPercentFull();
+ float bpf = base::debug::TraceLog::GetInstance()->GetBufferPercentFull();
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
NewRunnableMethod(this,
&TraceController::OnTraceBufferPercentFullReply,
@@ -161,7 +161,7 @@ void TraceController::OnEndTracingAck() {
// called with the last of the local trace data. Since we are on the UI
// thread, the call to OnTraceDataCollected will be synchronous, so we can
// immediately call OnEndTracingComplete below.
- gpu::TraceLog::GetInstance()->SetEnabled(false);
+ base::debug::TraceLog::GetInstance()->SetEnabled(false);
// Trigger callback if one is set.
if (subscriber_) {
@@ -229,7 +229,7 @@ void TraceController::OnTraceBufferPercentFullReply(float percent_full) {
if (pending_bpf_ack_count_ == 1) {
// The last ack represents local trace, so we need to ack it now. Note that
// this code only executes if there were child processes.
- float bpf = gpu::TraceLog::GetInstance()->GetBufferPercentFull();
+ float bpf = base::debug::TraceLog::GetInstance()->GetBufferPercentFull();
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
NewRunnableMethod(this,
&TraceController::OnTraceBufferPercentFullReply,

Powered by Google App Engine
This is Rietveld 408576698