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

Unified Diff: net/socket_stream/socket_stream.h

Issue 16874005: Merge r205158 (SocketStream uses a weak ptr to URLRequestContext) (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1500/src/
Patch Set: Created 7 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 | « chrome/browser/net/chrome_url_request_context.cc ('k') | net/socket_stream/socket_stream_job.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket_stream/socket_stream.h
===================================================================
--- net/socket_stream/socket_stream.h (revision 207753)
+++ net/socket_stream/socket_stream.h (working copy)
@@ -12,6 +12,7 @@
#include "base/memory/linked_ptr.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
+#include "base/memory/weak_ptr.h"
#include "net/base/address_list.h"
#include "net/base/completion_callback.h"
#include "net/base/io_buffer.h"
@@ -127,8 +128,8 @@
Delegate* delegate() const { return delegate_; }
int max_pending_send_allowed() const { return max_pending_send_allowed_; }
- const URLRequestContext* context() const { return context_; }
- void set_context(const URLRequestContext* context);
+ URLRequestContext* context() const { return context_.get(); }
+ void set_context(URLRequestContext* context);
BoundNetLog* net_log() { return &net_log_; }
@@ -336,7 +337,7 @@
// sum of the size of buffers in |pending_write_bufs_|
// exceeds this limit, SendData() fails.
int max_pending_send_allowed_;
- const URLRequestContext* context_;
+ base::WeakPtr<URLRequestContext> context_;
UserDataMap user_data_;
« no previous file with comments | « chrome/browser/net/chrome_url_request_context.cc ('k') | net/socket_stream/socket_stream_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698