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

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

Issue 2914173002: Removing file_thread_task_runner parameter from SerialIoHandler (Closed)
Patch Set: removed unused variable Created 3 years, 6 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
« no previous file with comments | « no previous file | device/serial/serial_io_handler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/lazy_instance.h" 6 #include "base/lazy_instance.h"
7 #include "base/memory/singleton.h" 7 #include "base/memory/singleton.h"
8 #include "base/threading/thread_task_runner_handle.h" 8 #include "base/threading/thread_task_runner_handle.h"
9 #include "base/trace_event/trace_event_impl.h" 9 #include "base/trace_event/trace_event_impl.h"
10 #include "content/browser/tracing/power_tracing_agent.h" 10 #include "content/browser/tracing/power_tracing_agent.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 base::Bind(&PowerTracingAgent::StartAgentTracingOnIOThread, 62 base::Bind(&PowerTracingAgent::StartAgentTracingOnIOThread,
63 base::Unretained(this), path, callback)); 63 base::Unretained(this), path, callback));
64 } 64 }
65 65
66 void PowerTracingAgent::StartAgentTracingOnIOThread( 66 void PowerTracingAgent::StartAgentTracingOnIOThread(
67 const std::string& path, 67 const std::string& path,
68 const StartAgentTracingCallback& callback) { 68 const StartAgentTracingCallback& callback) {
69 DCHECK_CURRENTLY_ON(BrowserThread::IO); 69 DCHECK_CURRENTLY_ON(BrowserThread::IO);
70 70
71 battor_agent_.reset(new battor::BattOrAgent( 71 battor_agent_.reset(new battor::BattOrAgent(
72 path, this, BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE), 72 path, this, BrowserThread::GetTaskRunnerForThread(BrowserThread::UI)));
73 BrowserThread::GetTaskRunnerForThread(BrowserThread::UI)));
74 73
75 start_tracing_callback_ = callback; 74 start_tracing_callback_ = callback;
76 battor_agent_->StartTracing(); 75 battor_agent_->StartTracing();
77 } 76 }
78 77
79 void PowerTracingAgent::OnStartTracingComplete(battor::BattOrError error) { 78 void PowerTracingAgent::OnStartTracingComplete(battor::BattOrError error) {
80 DCHECK_CURRENTLY_ON(BrowserThread::IO); 79 DCHECK_CURRENTLY_ON(BrowserThread::IO);
81 80
82 bool success = (error == battor::BATTOR_ERROR_NONE); 81 bool success = (error == battor::BATTOR_ERROR_NONE);
83 if (!success) 82 if (!success)
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 bool PowerTracingAgent::SupportsExplicitClockSync() { 179 bool PowerTracingAgent::SupportsExplicitClockSync() {
181 return battor_agent_->SupportsExplicitClockSync(); 180 return battor_agent_->SupportsExplicitClockSync();
182 } 181 }
183 182
184 void PowerTracingAgent::OnGetFirmwareGitHashComplete( 183 void PowerTracingAgent::OnGetFirmwareGitHashComplete(
185 const std::string& version, battor::BattOrError error) { 184 const std::string& version, battor::BattOrError error) {
186 return; 185 return;
187 } 186 }
188 187
189 } // namespace content 188 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | device/serial/serial_io_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698