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

Side by Side Diff: tools/battor_agent/battor_connection_impl.h

Issue 1991403002: [battor agent] Fix the init sequence so it retries inits instead of resets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed comment Created 4 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 | « tools/battor_agent/battor_connection.h ('k') | tools/battor_agent/battor_connection_impl.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 #ifndef TOOLS_BATTOR_AGENT_BATTOR_CONNECTION_IMPL_H_ 5 #ifndef TOOLS_BATTOR_AGENT_BATTOR_CONNECTION_IMPL_H_
6 #define TOOLS_BATTOR_AGENT_BATTOR_CONNECTION_IMPL_H_ 6 #define TOOLS_BATTOR_AGENT_BATTOR_CONNECTION_IMPL_H_
7 7
8 #include <fstream> 8 #include <fstream>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 26 matching lines...) Expand all
37 scoped_refptr<base::SingleThreadTaskRunner> file_thread_task_runner, 37 scoped_refptr<base::SingleThreadTaskRunner> file_thread_task_runner,
38 scoped_refptr<base::SingleThreadTaskRunner> ui_thread_task_runner); 38 scoped_refptr<base::SingleThreadTaskRunner> ui_thread_task_runner);
39 ~BattOrConnectionImpl() override; 39 ~BattOrConnectionImpl() override;
40 40
41 void Open() override; 41 void Open() override;
42 void Close() override; 42 void Close() override;
43 void SendBytes(BattOrMessageType type, 43 void SendBytes(BattOrMessageType type,
44 const void* buffer, 44 const void* buffer,
45 size_t bytes_to_send) override; 45 size_t bytes_to_send) override;
46 void ReadMessage(BattOrMessageType type) override; 46 void ReadMessage(BattOrMessageType type) override;
47 void CancelReadMessage() override;
47 void Flush() override; 48 void Flush() override;
48 49
49 protected: 50 protected:
50 // Overridden by the test to use a fake serial connection. 51 // Overridden by the test to use a fake serial connection.
51 virtual scoped_refptr<device::SerialIoHandler> CreateIoHandler(); 52 virtual scoped_refptr<device::SerialIoHandler> CreateIoHandler();
52 53
53 // IO handler capable of reading and writing from the serial connection. 54 // IO handler capable of reading and writing from the serial connection.
54 scoped_refptr<device::SerialIoHandler> io_handler_; 55 scoped_refptr<device::SerialIoHandler> io_handler_;
55 56
56 private: 57 private:
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 scoped_refptr<base::SingleThreadTaskRunner> ui_thread_task_runner_; 108 scoped_refptr<base::SingleThreadTaskRunner> ui_thread_task_runner_;
108 109
109 std::fstream serial_log_; 110 std::fstream serial_log_;
110 111
111 DISALLOW_COPY_AND_ASSIGN(BattOrConnectionImpl); 112 DISALLOW_COPY_AND_ASSIGN(BattOrConnectionImpl);
112 }; 113 };
113 114
114 } // namespace battor 115 } // namespace battor
115 116
116 #endif // TOOLS_BATTOR_AGENT_BATTOR_CONNECTION_IMPL_H_ 117 #endif // TOOLS_BATTOR_AGENT_BATTOR_CONNECTION_IMPL_H_
OLDNEW
« no previous file with comments | « tools/battor_agent/battor_connection.h ('k') | tools/battor_agent/battor_connection_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698