diff options
author | rsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-28 09:29:28 +0000 |
---|---|---|
committer | rsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-28 09:29:28 +0000 |
commit | a981330295415845ef13cd85afeff42032d782df (patch) | |
tree | 46ad72c4cabd094a5f4dea2faa1bde6fb7d3677f /net/base/net_log.h | |
parent | 20eef6d14fce11a57949d052db064e56242c4c82 (diff) | |
download | chromium_src-a981330295415845ef13cd85afeff42032d782df.zip chromium_src-a981330295415845ef13cd85afeff42032d782df.tar.gz chromium_src-a981330295415845ef13cd85afeff42032d782df.tar.bz2 |
RefCounted types should not have public destructors, net/
BUG=123295
TEST=none
Review URL: http://codereview.chromium.org/10066045
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134460 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/net_log.h')
-rw-r--r-- | net/base/net_log.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/net/base/net_log.h b/net/base/net_log.h index 707c321..1984abf 100644 --- a/net/base/net_log.h +++ b/net/base/net_log.h @@ -78,14 +78,18 @@ class NET_EXPORT NetLog { : public base::RefCountedThreadSafe<EventParameters> { public: EventParameters() {} - virtual ~EventParameters() {} // Serializes the parameters to a Value tree. This is intended to be a // lossless conversion, which is used to serialize the parameters to JSON. // The caller takes ownership of the returned Value*. virtual base::Value* ToValue() const = 0; + protected: + virtual ~EventParameters() {} + private: + friend class base::RefCountedThreadSafe<EventParameters>; + DISALLOW_COPY_AND_ASSIGN(EventParameters); }; @@ -321,7 +325,6 @@ class NET_EXPORT NetLogStringParameter : public NetLog::EventParameters { public: // |name| must be a string literal. NetLogStringParameter(const char* name, const std::string& value); - virtual ~NetLogStringParameter(); const std::string& value() const { return value_; @@ -329,6 +332,9 @@ class NET_EXPORT NetLogStringParameter : public NetLog::EventParameters { virtual base::Value* ToValue() const OVERRIDE; + protected: + virtual ~NetLogStringParameter(); + private: const char* const name_; const std::string value_; @@ -348,6 +354,9 @@ class NET_EXPORT NetLogIntegerParameter : public NetLog::EventParameters { virtual base::Value* ToValue() const OVERRIDE; + protected: + virtual ~NetLogIntegerParameter() {} + private: const char* name_; const int value_; @@ -367,6 +376,9 @@ class NET_EXPORT NetLogSourceParameter : public NetLog::EventParameters { virtual base::Value* ToValue() const OVERRIDE; + protected: + virtual ~NetLogSourceParameter() {} + private: const char* name_; const NetLog::Source value_; |