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

Unified Diff: mojo/services/network/public/cpp/web_socket_read_queue.h

Issue 1148913002: Fix WebSocket{Read,Write}Queue. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 | « mojo/services/network/public/DEPS ('k') | mojo/services/network/public/cpp/web_socket_read_queue.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/network/public/cpp/web_socket_read_queue.h
diff --git a/mojo/services/network/public/cpp/web_socket_read_queue.h b/mojo/services/network/public/cpp/web_socket_read_queue.h
index 27315105710a963d0521eb23d3aaffd7234bf27d..287e91cb34b429f77138d2d35229d0dcacc30fbd 100644
--- a/mojo/services/network/public/cpp/web_socket_read_queue.h
+++ b/mojo/services/network/public/cpp/web_socket_read_queue.h
@@ -7,6 +7,7 @@
#include "base/callback.h"
#include "base/memory/scoped_vector.h"
+#include "base/memory/weak_ptr.h"
#include "mojo/common/handle_watcher.h"
#include "third_party/mojo/src/mojo/public/cpp/system/data_pipe.h"
@@ -19,7 +20,7 @@ namespace mojo {
// See also: WebSocketWriteQueue
class WebSocketReadQueue {
public:
- WebSocketReadQueue(DataPipeConsumerHandle handle);
+ explicit WebSocketReadQueue(DataPipeConsumerHandle handle);
~WebSocketReadQueue();
void Read(uint32_t num_bytes, base::Callback<void(const char*)> callback);
@@ -34,7 +35,8 @@ class WebSocketReadQueue {
DataPipeConsumerHandle handle_;
common::HandleWatcher handle_watcher_;
ScopedVector<Operation> queue_;
- bool is_waiting_;
+ bool is_busy_;
+ base::WeakPtrFactory<WebSocketReadQueue> weak_factory_;
};
} // namespace mojo
« no previous file with comments | « mojo/services/network/public/DEPS ('k') | mojo/services/network/public/cpp/web_socket_read_queue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698