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

Unified Diff: tools/battor_agent/battor_agent.h

Issue 1524873002: Creates a BattOrConnection for communicating with the BattOr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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: tools/battor_agent/battor_agent.h
diff --git a/tools/battor_agent/battor_agent.h b/tools/battor_agent/battor_agent.h
index 413890e4ec2294e531167d79c086b00a65c87f6b..d09e0af9b32448505ed4fae0d8b64858410844ca 100644
--- a/tools/battor_agent/battor_agent.h
+++ b/tools/battor_agent/battor_agent.h
@@ -10,12 +10,9 @@
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "base/threading/thread_checker.h"
+#include "tools/battor_agent/battor_connection.h"
#include "tools/battor_agent/battor_error.h"
-namespace device {
-class SerialIoHandler;
-}
-
namespace battor {
// A BattOrAgent is a class used to asynchronously communicate with a BattOr for
@@ -43,7 +40,7 @@ class BattOrAgent : public base::SupportsWeakPtr<BattOrAgent> {
BattOrAgent(
scoped_refptr<base::SingleThreadTaskRunner> file_thread_task_runner,
- scoped_refptr<base::SingleThreadTaskRunner> ui_thread_task_rnuner,
+ scoped_refptr<base::SingleThreadTaskRunner> ui_thread_task_runner,
const std::string& path,
Listener* listener);
virtual ~BattOrAgent();
@@ -81,8 +78,8 @@ class BattOrAgent : public base::SupportsWeakPtr<BattOrAgent> {
// The listener that handles the commands' results. It must outlive the agent.
Listener* listener_;
- // IO handler capable of reading and writing from the serial connection.
- scoped_refptr<device::SerialIoHandler> io_handler_;
+ // The serial connection to the BattOr.
+ scoped_ptr<BattOrConnection> connection_;
// Checker to make sure that this is only ever called on the IO thread.
base::ThreadChecker thread_checker_;

Powered by Google App Engine
This is Rietveld 408576698