summaryrefslogtreecommitdiffstats
path: root/remoting
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-11 03:27:09 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-11 03:27:09 +0000
commitef2bf421b04de3134cd7c02aac40a5565ef24dd9 (patch)
tree5bf90cca0bd015c23e843614ebf2e9f99cb8cd99 /remoting
parent280e9b5d4b2fb0fe14824e526521710a658bce56 (diff)
downloadchromium_src-ef2bf421b04de3134cd7c02aac40a5565ef24dd9.zip
chromium_src-ef2bf421b04de3134cd7c02aac40a5565ef24dd9.tar.gz
chromium_src-ef2bf421b04de3134cd7c02aac40a5565ef24dd9.tar.bz2
Stop refcounting URLRequestContext.
While doing so, fix a few issues with the code like ordering of URLRequestContext to ensure correct destruction order. Also fix const correctness in some places. BUG=58859 TEST=none TBR=willchan Review URL: https://chromiumcodereview.appspot.com/10299002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@136497 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r--remoting/host/url_request_context.cc8
-rw-r--r--remoting/host/url_request_context.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/remoting/host/url_request_context.cc b/remoting/host/url_request_context.cc
index 901dc09..9d12a29 100644
--- a/remoting/host/url_request_context.cc
+++ b/remoting/host/url_request_context.cc
@@ -122,11 +122,11 @@ URLRequestContextGetter::URLRequestContextGetter(
}
net::URLRequestContext* URLRequestContextGetter::GetURLRequestContext() {
- if (!url_request_context_) {
- url_request_context_ =
- new URLRequestContext(proxy_config_service_.Pass());
+ if (!url_request_context_.get()) {
+ url_request_context_.reset(
+ new URLRequestContext(proxy_config_service_.Pass()));
}
- return url_request_context_;
+ return url_request_context_.get();
}
scoped_refptr<base::MessageLoopProxy>
diff --git a/remoting/host/url_request_context.h b/remoting/host/url_request_context.h
index 5c0c6ee..d1f2cd3 100644
--- a/remoting/host/url_request_context.h
+++ b/remoting/host/url_request_context.h
@@ -52,9 +52,9 @@ class URLRequestContextGetter : public net::URLRequestContextGetter {
virtual ~URLRequestContextGetter();
private:
- scoped_refptr<net::URLRequestContext> url_request_context_;
scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_;
scoped_ptr<net::ProxyConfigService> proxy_config_service_;
+ scoped_ptr<net::URLRequestContext> url_request_context_;
DISALLOW_COPY_AND_ASSIGN(URLRequestContextGetter);
};