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

Unified Diff: net/url_request/url_request.cc

Issue 10299002: Stop refcounting URLRequestContext. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Initialize to NULL Created 8 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 | « net/url_request/url_request.h ('k') | net/url_request/url_request_context.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request.cc
diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc
index 3947d69bf635fa6c409b646e47043c0e9a134593..c2c2c5e48c7a9d825c4a95b7c978840d4c345dfd 100644
--- a/net/url_request/url_request.cc
+++ b/net/url_request/url_request.cc
@@ -132,7 +132,8 @@ void URLRequest::Delegate::OnSSLCertificateError(URLRequest* request,
// URLRequest
URLRequest::URLRequest(const GURL& url, Delegate* delegate)
- : url_chain_(1, url),
+ : context_(NULL),
+ url_chain_(1, url),
method_("GET"),
referrer_policy_(CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE),
load_flags_(LOAD_NORMAL),
@@ -721,7 +722,7 @@ int URLRequest::Redirect(const GURL& location, int http_status_code) {
}
const URLRequestContext* URLRequest::context() const {
- return context_.get();
+ return context_;
}
void URLRequest::set_context(const URLRequestContext* context) {
@@ -738,7 +739,7 @@ void URLRequest::set_context(const URLRequestContext* context) {
url_requests->insert(this);
}
- scoped_refptr<const URLRequestContext> prev_context = context_;
+ const URLRequestContext* prev_context = context_;
context_ = context;
« no previous file with comments | « net/url_request/url_request.h ('k') | net/url_request/url_request_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698