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

Unified Diff: remoting/host/security_key/security_key_socket.h

Issue 2589933002: Updating SecurityKeyAuthHandlerPosix socket lifetime management (Closed)
Patch Set: Addressing CR feedback Created 4 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: remoting/host/security_key/security_key_socket.h
diff --git a/remoting/host/security_key/security_key_socket.h b/remoting/host/security_key/security_key_socket.h
index 069bd8119b36b3a53f278c8d94b1ba2eca8241aa..3636a470ef3c2e0d8ef8e8e0fc13fd7c3679d864 100644
--- a/remoting/host/security_key/security_key_socket.h
+++ b/remoting/host/security_key/security_key_socket.h
@@ -54,6 +54,8 @@ class SecurityKeySocket {
// get the request data.
void StartReadingRequest(const base::Closure& request_received_callback);
+ bool socket_read_error() const { return socket_read_error_; }
+
private:
// Called when bytes are written to |socket_|.
void OnDataWritten(int result);
@@ -91,9 +93,11 @@ class SecurityKeySocket {
// Invoked when request data has been read.
base::Closure request_received_callback_;
- // Indicates whether read has completed and |request_received_callback_| is
- // about to be run.
- bool read_completed_;
+ // Indicates whether the socket is being used to wait for a request.
+ bool waiting_for_request_ = false;
+
+ // Indicates whether an error was encountered while reading from the socket.
+ bool socket_read_error_ = false;
// Request data.
std::vector<char> request_data_;

Powered by Google App Engine
This is Rietveld 408576698