diff options
author | rsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-06 02:27:18 +0000 |
---|---|---|
committer | rsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-06 02:27:18 +0000 |
commit | 13ed17f87ebf33664331a0e56fefddbeb833891a (patch) | |
tree | 560115ee0ad43ec4dd78b175894d6ca8e9374400 /remoting | |
parent | 1f305b559be7437fbb6d6ca0ea31897a1013e466 (diff) | |
download | chromium_src-13ed17f87ebf33664331a0e56fefddbeb833891a.zip chromium_src-13ed17f87ebf33664331a0e56fefddbeb833891a.tar.gz chromium_src-13ed17f87ebf33664331a0e56fefddbeb833891a.tar.bz2 |
All classes that directly derive from net::URLRequestContextGetter should have "protected"
virtual destructors, not "public".
By having a public destructor, it becomes possible to stack
allocate the derived class. Stack allocating a RCTS is a
dangerous behaviour, since there may still be a caller who
holds a reference when the object goes out of scope.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/9958145
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131072 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r-- | remoting/host/url_request_context.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/remoting/host/url_request_context.h b/remoting/host/url_request_context.h index 4b356ca..a43d10d 100644 --- a/remoting/host/url_request_context.h +++ b/remoting/host/url_request_context.h @@ -46,9 +46,10 @@ class URLRequestContextGetter : public net::URLRequestContextGetter { virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() const OVERRIDE; - private: + protected: 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_; |