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

Unified Diff: net/base/net_log.h

Issue 10066045: RefCounted types should not have public destructors, net/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Deprecated cookiestore fix Created 8 years, 8 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/base/listen_socket.h ('k') | net/base/net_log.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/net_log.h
diff --git a/net/base/net_log.h b/net/base/net_log.h
index 707c3216f8296cdf656a1fbbfcd2122a6bfd4611..1984abf4339fad9581d5d6f51b055ad1bab440b0 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_;
« no previous file with comments | « net/base/listen_socket.h ('k') | net/base/net_log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698