Chromium Code Reviews| OLD | NEW |
|---|---|
| 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: Open up a serial connection with the BattOr. |
|
Zhen Wang
2015/10/30 16:46:44
TODO(charliea)
Same for other places.
charliea (OOO until 10-5)
2015/10/30 17:37:42
Done.
| |
| 13 } | 16 } |
| 14 | 17 |
| 15 BattOrAgent::~BattOrAgent() { | 18 BattOrAgent::~BattOrAgent() { |
| 16 // TODO: Close the serial connection with the BattOr. | 19 // TODO: 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: 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, |
| 27 const base::Closure& callback) { | |
| 24 // TODO: Tell the BattOr to stop tracing. | 28 // TODO: 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, |
| 34 const base::Closure& callback) { | |
| 28 // TODO: Tell the BattOr to record the specified clock sync marker. | 35 // TODO: 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: Tell atrace to issue a clock sync marker. |
| 33 } | 41 } |
| 34 | 42 |
| 35 } // namespace battor | 43 } // namespace battor |
| OLD | NEW |