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

Side by Side Diff: tools/battor_agent/battor_agent.cc

Issue 1407033008: Makes the BattOrAgent asynchronous (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added //base dependency to bin 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 | « tools/battor_agent/battor_agent.h ('k') | tools/battor_agent/battor_agent_bin.cc » ('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 "tools/battor_agent/battor_agent.h" 5 #include "tools/battor_agent/battor_agent.h"
6 6
7 #include <iostream> 7 #include <iostream>
8 8
9 #include "base/callback.h"
10 #include "base/memory/scoped_ptr.h"
11
9 namespace battor { 12 namespace battor {
10 13
11 BattOrAgent::BattOrAgent(const std::string& path) : path_(path) { 14 BattOrAgent::BattOrAgent(const std::string& path) : path_(path) {
12 // TODO: Open up a serial connection with the BattOr. 15 // TODO(charliea): Open up a serial connection with the BattOr.
13 } 16 }
14 17
15 BattOrAgent::~BattOrAgent() { 18 BattOrAgent::~BattOrAgent() {
16 // TODO: Close the serial connection with the BattOr. 19 // TODO(charliea): Close the serial connection with the BattOr.
17 } 20 }
18 21
19 void BattOrAgent::StartTracing() { 22 void BattOrAgent::StartTracing() {
20 // TODO: Tell the BattOr to start tracing. 23 // TODO(charliea): Tell the BattOr to start tracing.
21 } 24 }
22 25
23 void BattOrAgent::StopTracing(std::string* out_trace) { 26 void BattOrAgent::StopTracing(std::string* trace_output,
24 // TODO: Tell the BattOr to stop tracing. 27 const base::Closure& callback) {
28 // TODO(charliea): Tell the BattOr to stop tracing.
29 *trace_output = "battor trace output";
30 callback.Run();
25 } 31 }
26 32
27 void BattOrAgent::RecordClockSyncMarker(const std::string& marker) { 33 void BattOrAgent::RecordClockSyncMarker(const std::string& marker,
28 // TODO: Tell the BattOr to record the specified clock sync marker. 34 const base::Closure& callback) {
35 // TODO(charliea): Tell the BattOr to record the specified clock sync marker.
36 callback.Run();
29 } 37 }
30 38
31 void BattOrAgent::IssueClockSyncMarker() { 39 void BattOrAgent::IssueClockSyncMarker() {
32 // TODO: Tell atrace to issue a clock sync marker. 40 // TODO(charliea): Tell atrace to issue a clock sync marker.
33 } 41 }
34 42
35 } // namespace battor 43 } // namespace battor
OLDNEW
« no previous file with comments | « tools/battor_agent/battor_agent.h ('k') | tools/battor_agent/battor_agent_bin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698