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 /content/shell | |
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 'content/shell')
-rw-r--r-- | content/shell/shell_url_request_context_getter.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/content/shell/shell_url_request_context_getter.h b/content/shell/shell_url_request_context_getter.h index 9f70dc6..4de8bb8 100644 --- a/content/shell/shell_url_request_context_getter.h +++ b/content/shell/shell_url_request_context_getter.h @@ -29,7 +29,6 @@ class ShellURLRequestContextGetter : public net::URLRequestContextGetter { const FilePath& base_path, MessageLoop* io_loop, MessageLoop* file_loop); - virtual ~ShellURLRequestContextGetter(); // net::URLRequestContextGetter implementation. virtual net::URLRequestContext* GetURLRequestContext() OVERRIDE; @@ -38,6 +37,9 @@ class ShellURLRequestContextGetter : public net::URLRequestContextGetter { net::HostResolver* host_resolver(); + protected: + virtual ~ShellURLRequestContextGetter(); + private: FilePath base_path_; MessageLoop* io_loop_; |