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

Unified Diff: net/http/bidirectional_stream.h

Issue 2043863002: Use WeakPtrFactory in net::BidirectionalStream when posting task (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Matt's comments 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/http/bidirectional_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/bidirectional_stream.h
diff --git a/net/http/bidirectional_stream.h b/net/http/bidirectional_stream.h
index 95e7f2e90f3b1cc243900cbb11904d9eae666f3f..85e8780dd4a157847d795f53998beef0c4e854ef 100644
--- a/net/http/bidirectional_stream.h
+++ b/net/http/bidirectional_stream.h
@@ -12,6 +12,7 @@
#include "base/compiler_specific.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
+#include "base/memory/weak_ptr.h"
#include "net/http/bidirectional_stream_impl.h"
#include "net/http/http_stream_factory.h"
#include "net/log/net_log.h"
@@ -216,6 +217,9 @@ class NET_EXPORT BidirectionalStream
HttpStream* stream) override;
void OnQuicBroken() override;
+ // Helper method to notify delegate if there is an error.
+ void NotifyFailed(int error);
+
// BidirectionalStreamRequestInfo used when requesting the stream.
std::unique_ptr<BidirectionalStreamRequestInfo> request_info_;
const BoundNetLog net_log_;
@@ -246,6 +250,8 @@ class NET_EXPORT BidirectionalStream
// List of buffer length.
std::vector<int> write_buffer_len_list_;
+ base::WeakPtrFactory<BidirectionalStream> weak_factory_;
+
DISALLOW_COPY_AND_ASSIGN(BidirectionalStream);
};
« no previous file with comments | « no previous file | net/http/bidirectional_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698