summaryrefslogtreecommitdiffstats
path: root/net/http
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-05 23:34:24 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-05 23:34:24 +0000
commit5389bc7ba5360633af04b9cf15497d56ce640ead (patch)
tree4518c05f3bad18a5b2f4739fc1a1c187651f9799 /net/http
parent4070a6b1efcb2dbea12508a0b912cfa3bc86f47e (diff)
downloadchromium_src-5389bc7ba5360633af04b9cf15497d56ce640ead.zip
chromium_src-5389bc7ba5360633af04b9cf15497d56ce640ead.tar.gz
chromium_src-5389bc7ba5360633af04b9cf15497d56ce640ead.tar.bz2
Second patch in making destructors of refcounted objects private.
BUG=26749 Review URL: http://codereview.chromium.org/368001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31165 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http')
-rw-r--r--net/http/http_auth_cache_unittest.cc3
-rw-r--r--net/http/http_auth_handler.h6
-rw-r--r--net/http/http_auth_handler_basic.h2
-rw-r--r--net/http/http_auth_handler_digest.h2
-rw-r--r--net/http/http_auth_handler_ntlm.h4
-rw-r--r--net/http/http_cache_unittest.cc7
-rw-r--r--net/http/http_network_session.h4
7 files changed, 20 insertions, 8 deletions
diff --git a/net/http/http_auth_cache_unittest.cc b/net/http/http_auth_cache_unittest.cc
index 28bde95..52fa5cd 100644
--- a/net/http/http_auth_cache_unittest.cc
+++ b/net/http/http_auth_cache_unittest.cc
@@ -34,6 +34,9 @@ class MockAuthHandler : public HttpAuthHandler {
virtual bool Init(std::string::const_iterator, std::string::const_iterator) {
return false; // Unused.
}
+
+ private:
+ ~MockAuthHandler() {}
};
} // namespace
diff --git a/net/http/http_auth_handler.h b/net/http/http_auth_handler.h
index 1caf1a4..02a410e 100644
--- a/net/http/http_auth_handler.h
+++ b/net/http/http_auth_handler.h
@@ -21,8 +21,6 @@ class ProxyInfo;
// HttpAuth::CreateAuthHandler().
class HttpAuthHandler : public base::RefCounted<HttpAuthHandler> {
public:
- virtual ~HttpAuthHandler() { }
-
// Initialize the handler by parsing a challenge string.
bool InitFromChallenge(std::string::const_iterator begin,
std::string::const_iterator end,
@@ -86,6 +84,10 @@ class HttpAuthHandler : public base::RefCounted<HttpAuthHandler> {
IS_CONNECTION_BASED = 1 << 1,
};
+ friend class base::RefCounted<HttpAuthHandler>;
+
+ virtual ~HttpAuthHandler() { }
+
// Initialize the handler by parsing a challenge string.
// Implementations are expcted to initialize the following members:
// scheme_, realm_, score_, properties_
diff --git a/net/http/http_auth_handler_basic.h b/net/http/http_auth_handler_basic.h
index 1424c8f..679c91a 100644
--- a/net/http/http_auth_handler_basic.h
+++ b/net/http/http_auth_handler_basic.h
@@ -20,6 +20,8 @@ class HttpAuthHandlerBasic : public HttpAuthHandler {
virtual bool Init(std::string::const_iterator challenge_begin,
std::string::const_iterator challenge_end);
+ private:
+ ~HttpAuthHandlerBasic() {}
};
} // namespace net
diff --git a/net/http/http_auth_handler_digest.h b/net/http/http_auth_handler_digest.h
index 26d67f8..b4c8687 100644
--- a/net/http/http_auth_handler_digest.h
+++ b/net/http/http_auth_handler_digest.h
@@ -53,6 +53,8 @@ class HttpAuthHandlerDigest : public HttpAuthHandler {
QOP_AUTH_INT = 1 << 1,
};
+ ~HttpAuthHandlerDigest() {}
+
// Parse the challenge, saving the results into this instance.
// Returns true on success.
bool ParseChallenge(std::string::const_iterator challenge_begin,
diff --git a/net/http/http_auth_handler_ntlm.h b/net/http/http_auth_handler_ntlm.h
index 27a6666..ca2b234 100644
--- a/net/http/http_auth_handler_ntlm.h
+++ b/net/http/http_auth_handler_ntlm.h
@@ -63,8 +63,6 @@ class HttpAuthHandlerNTLM : public HttpAuthHandler {
HttpAuthHandlerNTLM();
- virtual ~HttpAuthHandlerNTLM();
-
virtual bool NeedsIdentity();
virtual bool IsFinalRound();
@@ -85,6 +83,8 @@ class HttpAuthHandlerNTLM : public HttpAuthHandler {
int InitializeBeforeFirstChallenge();
private:
+ ~HttpAuthHandlerNTLM();
+
#if defined(NTLM_PORTABLE)
// For unit tests to override the GenerateRandom and GetHostName functions.
// Returns the old function.
diff --git a/net/http/http_cache_unittest.cc b/net/http/http_cache_unittest.cc
index 6ba7188..fd66e79 100644
--- a/net/http/http_cache_unittest.cc
+++ b/net/http/http_cache_unittest.cc
@@ -61,9 +61,6 @@ class MockDiskEntry : public disk_cache::Entry,
test_mode_ = t->test_mode;
}
- ~MockDiskEntry() {
- }
-
bool is_doomed() const { return doomed_; }
virtual void Doom() {
@@ -254,6 +251,10 @@ class MockDiskEntry : public disk_cache::Entry,
void set_fail_requests() { fail_requests_ = true; }
private:
+ friend class base::RefCounted<MockDiskEntry>;
+
+ ~MockDiskEntry() {}
+
// Unlike the callbacks for MockHttpTransaction, we want this one to run even
// if the consumer called Close on the MockDiskEntry. We achieve that by
// leveraging the fact that this class is reference counted.
diff --git a/net/http/http_network_session.h b/net/http/http_network_session.h
index b5786de..11e42f4 100644
--- a/net/http/http_network_session.h
+++ b/net/http/http_network_session.h
@@ -25,7 +25,6 @@ class HttpNetworkSession : public base::RefCounted<HttpNetworkSession> {
ClientSocketFactory* client_socket_factory,
SSLConfigService* ssl_config_service,
FlipSessionPool* flip_session_pool);
- ~HttpNetworkSession();
HttpAuthCache* auth_cache() { return &auth_cache_; }
SSLClientAuthCache* ssl_client_auth_cache() {
@@ -44,8 +43,11 @@ class HttpNetworkSession : public base::RefCounted<HttpNetworkSession> {
static void set_max_sockets_per_group(int socket_count);
private:
+ friend class base::RefCounted<HttpNetworkSession>;
FRIEND_TEST(HttpNetworkTransactionTest, GroupNameForProxyConnections);
+ ~HttpNetworkSession();
+
// Total limit of sockets. Not a constant to allow experiments.
static int max_sockets_;