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

Unified Diff: chrome/browser/devtools/adb_client_socket.h

Issue 12586010: DevTools: extract ADB command classes, change objects' lifetimes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Win build fixed. Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/devtools/adb_client_socket.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/devtools/adb_client_socket.h
diff --git a/chrome/browser/devtools/adb_client_socket.h b/chrome/browser/devtools/adb_client_socket.h
index f5e78729397176bfbe9f644172639a3f2db340e8..f93a1af0dfa88de87520f99f388b25b9ba3cb72d 100644
--- a/chrome/browser/devtools/adb_client_socket.h
+++ b/chrome/browser/devtools/adb_client_socket.h
@@ -31,10 +31,35 @@ class AdbClientSocket {
const std::string& request,
const SocketCallback& callback);
- private:
- AdbClientSocket();
+ AdbClientSocket(const std::string& host, int port);
~AdbClientSocket();
+ protected:
+ void Connect(const net::CompletionCallback& callback);
+
+ void SendCommand(const std::string& command,
+ bool is_void,
+ const CommandCallback& callback);
+
+ scoped_ptr<net::TCPClientSocket> socket_;
+
+ private:
+ void ReadResponse(const CommandCallback& callback, bool is_void, int result);
+
+ void OnResponseHeader(const CommandCallback& callback,
+ bool is_void,
+ scoped_refptr<net::IOBuffer> response_buffer,
+ int result);
+
+ void OnResponseData(const CommandCallback& callback,
+ const std::string& response,
+ scoped_refptr<net::IOBuffer> response_buffer,
+ int bytes_left,
+ int result);
+
+ std::string host_;
+ int port_;
+
DISALLOW_COPY_AND_ASSIGN(AdbClientSocket);
};
« no previous file with comments | « no previous file | chrome/browser/devtools/adb_client_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698