summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-01 22:05:28 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-01 22:05:28 +0000
commitd0af7203fccbb273cd4ee112b12ca93c18441efa (patch)
tree6410ef23531cf87aac1981a74326ced5a25fa0df /net
parent7f71e75e4eb1decfdc52f28b2ec48671d09f373b (diff)
downloadchromium_src-d0af7203fccbb273cd4ee112b12ca93c18441efa.zip
chromium_src-d0af7203fccbb273cd4ee112b12ca93c18441efa.tar.gz
chromium_src-d0af7203fccbb273cd4ee112b12ca93c18441efa.tar.bz2
Revert "FBTF: Another big ctor/dtor cleanup found by automated tools."
This reverts commit 27ea47d65cf8767f350113d5ad9e25170efde811 (r61237). BUG=none TEST=compiles Review URL: http://codereview.chromium.org/3609005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61240 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r--net/base/capturing_net_log.cc23
-rw-r--r--net/base/capturing_net_log.h16
-rw-r--r--net/base/cert_database.cc3
-rw-r--r--net/base/cert_database.h1
-rw-r--r--net/base/cookie_monster.cc3
-rw-r--r--net/base/cookie_monster.h2
-rw-r--r--net/base/cookie_store.cc36
-rw-r--r--net/base/cookie_store.h20
-rw-r--r--net/base/mock_host_resolver.cc25
-rw-r--r--net/base/mock_host_resolver.h19
-rw-r--r--net/base/ssl_config_service.cc4
-rw-r--r--net/base/ssl_config_service.h3
-rw-r--r--net/base/x509_certificate.h3
-rw-r--r--net/http/http_request_info.cc17
-rw-r--r--net/http/http_request_info.h8
-rw-r--r--net/net.gyp2
-rw-r--r--net/server/http_server_request_info.h2
-rw-r--r--net/socket/client_socket_pool_histograms.h2
-rw-r--r--net/socket_stream/socket_stream_job.cc34
-rw-r--r--net/socket_stream/socket_stream_job.h35
20 files changed, 73 insertions, 185 deletions
diff --git a/net/base/capturing_net_log.cc b/net/base/capturing_net_log.cc
index c488e06..08f3b8d 100644
--- a/net/base/capturing_net_log.cc
+++ b/net/base/capturing_net_log.cc
@@ -6,23 +6,10 @@
namespace net {
-CapturingNetLog::Entry::Entry(EventType type,
- const base::TimeTicks& time,
- Source source,
- EventPhase phase,
- EventParameters* extra_parameters)
- : type(type), time(time), source(source), phase(phase),
- extra_parameters(extra_parameters) {
-}
-
-CapturingNetLog::Entry::~Entry() {}
-
CapturingNetLog::CapturingNetLog(size_t max_num_entries)
: next_id_(0), max_num_entries_(max_num_entries) {
}
-CapturingNetLog::~CapturingNetLog() {}
-
void CapturingNetLog::AddEntry(EventType type,
const base::TimeTicks& time,
const Source& source,
@@ -41,16 +28,6 @@ void CapturingNetLog::Clear() {
entries_.clear();
}
-CapturingBoundNetLog::CapturingBoundNetLog(const NetLog::Source& source,
- CapturingNetLog* net_log)
- : source_(source), capturing_net_log_(net_log) {
-}
-
-CapturingBoundNetLog::CapturingBoundNetLog(size_t max_num_entries)
- : capturing_net_log_(new CapturingNetLog(max_num_entries)) {}
-
-CapturingBoundNetLog::~CapturingBoundNetLog() {}
-
void CapturingBoundNetLog::Clear() {
capturing_net_log_->Clear();
}
diff --git a/net/base/capturing_net_log.h b/net/base/capturing_net_log.h
index 6e0f620..9669445 100644
--- a/net/base/capturing_net_log.h
+++ b/net/base/capturing_net_log.h
@@ -25,8 +25,10 @@ class CapturingNetLog : public NetLog {
const base::TimeTicks& time,
Source source,
EventPhase phase,
- EventParameters* extra_parameters);
- ~Entry();
+ EventParameters* extra_parameters)
+ : type(type), time(time), source(source), phase(phase),
+ extra_parameters(extra_parameters) {
+ }
EventType type;
base::TimeTicks time;
@@ -43,7 +45,6 @@ class CapturingNetLog : public NetLog {
// Creates a CapturingNetLog that logs a maximum of |max_num_entries|
// messages.
explicit CapturingNetLog(size_t max_num_entries);
- virtual ~CapturingNetLog();
// NetLog implementation:
virtual void AddEntry(EventType type,
@@ -74,11 +75,12 @@ class CapturingNetLog : public NetLog {
// bound() method.
class CapturingBoundNetLog {
public:
- CapturingBoundNetLog(const NetLog::Source& source, CapturingNetLog* net_log);
-
- explicit CapturingBoundNetLog(size_t max_num_entries);
+ CapturingBoundNetLog(const NetLog::Source& source, CapturingNetLog* net_log)
+ : source_(source), capturing_net_log_(net_log) {
+ }
- ~CapturingBoundNetLog();
+ explicit CapturingBoundNetLog(size_t max_num_entries)
+ : capturing_net_log_(new CapturingNetLog(max_num_entries)) {}
// The returned BoundNetLog is only valid while |this| is alive.
BoundNetLog bound() const {
diff --git a/net/base/cert_database.cc b/net/base/cert_database.cc
index 313a6dd0..961638c 100644
--- a/net/base/cert_database.cc
+++ b/net/base/cert_database.cc
@@ -13,7 +13,4 @@ CertDatabase::ImportCertFailure::ImportCertFailure(
: certificate(cert), net_error(err) {
}
-CertDatabase::ImportCertFailure::~ImportCertFailure() {
-}
-
} // namespace net
diff --git a/net/base/cert_database.h b/net/base/cert_database.h
index 38fb403..52888fe 100644
--- a/net/base/cert_database.h
+++ b/net/base/cert_database.h
@@ -65,7 +65,6 @@ class CertDatabase {
struct ImportCertFailure {
public:
ImportCertFailure(X509Certificate* cert, int err);
- ~ImportCertFailure();
scoped_refptr<X509Certificate> certificate;
int net_error;
diff --git a/net/base/cookie_monster.cc b/net/base/cookie_monster.cc
index 82d35b1..a75420f 100644
--- a/net/base/cookie_monster.cc
+++ b/net/base/cookie_monster.cc
@@ -1531,9 +1531,6 @@ CookieMonster::ParsedCookie::ParsedCookie(const std::string& cookie_line)
}
}
-CookieMonster::ParsedCookie::~ParsedCookie() {
-}
-
// Returns true if |c| occurs in |chars|
// TODO maybe make this take an iterator, could check for end also?
static inline bool CharIsA(const char c, const char* chars) {
diff --git a/net/base/cookie_monster.h b/net/base/cookie_monster.h
index 33953d9..80535c2 100644
--- a/net/base/cookie_monster.h
+++ b/net/base/cookie_monster.h
@@ -585,7 +585,7 @@ class CookieMonster::ParsedCookie {
// Construct from a cookie string like "BLAH=1; path=/; domain=.google.com"
ParsedCookie(const std::string& cookie_line);
- ~ParsedCookie();
+ ~ParsedCookie() { }
// You should not call any other methods on the class if !IsValid
bool IsValid() const { return is_valid_; }
diff --git a/net/base/cookie_store.cc b/net/base/cookie_store.cc
deleted file mode 100644
index 4891fdf..0000000
--- a/net/base/cookie_store.cc
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "net/base/cookie_store.h"
-
-#include "net/base/cookie_options.h"
-
-namespace net {
-
-bool CookieStore::SetCookie(const GURL& url, const std::string& cookie_line) {
- return SetCookieWithOptions(url, cookie_line, CookieOptions());
-}
-
-std::string CookieStore::GetCookies(const GURL& url) {
- return GetCookiesWithOptions(url, CookieOptions());
-}
-
-void CookieStore::SetCookiesWithOptions(
- const GURL& url,
- const std::vector<std::string>& cookie_lines,
- const CookieOptions& options) {
- for (size_t i = 0; i < cookie_lines.size(); ++i)
- SetCookieWithOptions(url, cookie_lines[i], options);
-}
-
-void CookieStore::SetCookies(const GURL& url,
- const std::vector<std::string>& cookie_lines) {
- SetCookiesWithOptions(url, cookie_lines, CookieOptions());
-}
-
-CookieStore::CookieStore() {}
-
-CookieStore::~CookieStore() {}
-
-} // namespace net
diff --git a/net/base/cookie_store.h b/net/base/cookie_store.h
index 3976169..2360c96 100644
--- a/net/base/cookie_store.h
+++ b/net/base/cookie_store.h
@@ -50,22 +50,30 @@ class CookieStore : public base::RefCountedThreadSafe<CookieStore> {
// Helpers to make the above interface simpler for some cases.
// Sets a cookie for the given URL using default options.
- bool SetCookie(const GURL& url, const std::string& cookie_line);
+ bool SetCookie(const GURL& url, const std::string& cookie_line) {
+ return SetCookieWithOptions(url, cookie_line, CookieOptions());
+ }
// Gets cookies for the given URL using default options.
- std::string GetCookies(const GURL& url);
+ std::string GetCookies(const GURL& url) {
+ return GetCookiesWithOptions(url, CookieOptions());
+ }
// Sets a vector of response cookie values for the same URL.
void SetCookiesWithOptions(const GURL& url,
const std::vector<std::string>& cookie_lines,
- const CookieOptions& options);
+ const CookieOptions& options) {
+ for (size_t i = 0; i < cookie_lines.size(); ++i)
+ SetCookieWithOptions(url, cookie_lines[i], options);
+ }
void SetCookies(const GURL& url,
- const std::vector<std::string>& cookie_lines);
+ const std::vector<std::string>& cookie_lines) {
+ SetCookiesWithOptions(url, cookie_lines, CookieOptions());
+ }
protected:
friend class base::RefCountedThreadSafe<CookieStore>;
- CookieStore();
- virtual ~CookieStore();
+ virtual ~CookieStore() {}
};
} // namespace net
diff --git a/net/base/mock_host_resolver.cc b/net/base/mock_host_resolver.cc
index 6eae712..f8c53a6 100644
--- a/net/base/mock_host_resolver.cc
+++ b/net/base/mock_host_resolver.cc
@@ -50,8 +50,6 @@ MockHostResolverBase::MockHostResolverBase(bool use_caching)
Reset(NULL);
}
-MockHostResolverBase::~MockHostResolverBase() {}
-
int MockHostResolverBase::Resolve(const RequestInfo& info,
AddressList* addresses,
CompletionCallback* callback,
@@ -260,29 +258,6 @@ int RuleBasedHostResolverProc::Resolve(const std::string& host,
//-----------------------------------------------------------------------------
-WaitingHostResolverProc::WaitingHostResolverProc(HostResolverProc* previous)
- : HostResolverProc(previous), event_(false, false) {}
-
-void WaitingHostResolverProc::Signal() {
- event_.Signal();
-}
-
-int WaitingHostResolverProc::Resolve(const std::string& host,
- AddressFamily address_family,
- HostResolverFlags host_resolver_flags,
- AddressList* addrlist,
- int* os_error) {
- event_.Wait();
- return ResolveUsingPrevious(host, address_family, host_resolver_flags,
- addrlist, os_error);
-}
-
-WaitingHostResolverProc::~WaitingHostResolverProc() {}
-
-//-----------------------------------------------------------------------------
-
-ScopedDefaultHostResolverProc::ScopedDefaultHostResolverProc() {}
-
ScopedDefaultHostResolverProc::ScopedDefaultHostResolverProc(
HostResolverProc* proc) {
Init(proc);
diff --git a/net/base/mock_host_resolver.h b/net/base/mock_host_resolver.h
index 59dd02c..4b185b2 100644
--- a/net/base/mock_host_resolver.h
+++ b/net/base/mock_host_resolver.h
@@ -68,7 +68,7 @@ class MockHostResolverBase : public HostResolver {
protected:
MockHostResolverBase(bool use_caching);
- virtual ~MockHostResolverBase();
+ virtual ~MockHostResolverBase() {}
scoped_refptr<HostResolverImpl> impl_;
scoped_refptr<RuleBasedHostResolverProc> rules_;
@@ -154,19 +154,26 @@ class RuleBasedHostResolverProc : public HostResolverProc {
// Using WaitingHostResolverProc you can simulate very long lookups.
class WaitingHostResolverProc : public HostResolverProc {
public:
- explicit WaitingHostResolverProc(HostResolverProc* previous);
+ explicit WaitingHostResolverProc(HostResolverProc* previous)
+ : HostResolverProc(previous), event_(false, false) {}
- void Signal();
+ void Signal() {
+ event_.Signal();
+ }
// HostResolverProc methods:
virtual int Resolve(const std::string& host,
AddressFamily address_family,
HostResolverFlags host_resolver_flags,
AddressList* addrlist,
- int* os_error);
+ int* os_error) {
+ event_.Wait();
+ return ResolveUsingPrevious(host, address_family, host_resolver_flags,
+ addrlist, os_error);
+ }
private:
- virtual ~WaitingHostResolverProc();
+ ~WaitingHostResolverProc() {}
base::WaitableEvent event_;
};
@@ -182,7 +189,7 @@ class WaitingHostResolverProc : public HostResolverProc {
// MockHostResolver.
class ScopedDefaultHostResolverProc {
public:
- ScopedDefaultHostResolverProc();
+ ScopedDefaultHostResolverProc() {}
explicit ScopedDefaultHostResolverProc(HostResolverProc* proc);
~ScopedDefaultHostResolverProc();
diff --git a/net/base/ssl_config_service.cc b/net/base/ssl_config_service.cc
index b349a76..fc35f5d 100644
--- a/net/base/ssl_config_service.cc
+++ b/net/base/ssl_config_service.cc
@@ -15,10 +15,6 @@
namespace net {
-SSLConfig::CertAndStatus::CertAndStatus() {}
-
-SSLConfig::CertAndStatus::~CertAndStatus() {}
-
SSLConfig::SSLConfig()
: rev_checking_enabled(true), ssl2_enabled(false), ssl3_enabled(true),
tls1_enabled(true), dnssec_enabled(false), snap_start_enabled(false),
diff --git a/net/base/ssl_config_service.h b/net/base/ssl_config_service.h
index 45c5392..5eb2397 100644
--- a/net/base/ssl_config_service.h
+++ b/net/base/ssl_config_service.h
@@ -44,9 +44,6 @@ struct SSLConfig {
// are not SSL configuration settings.
struct CertAndStatus {
- CertAndStatus();
- ~CertAndStatus();
-
scoped_refptr<X509Certificate> cert;
int cert_status;
};
diff --git a/net/base/x509_certificate.h b/net/base/x509_certificate.h
index 5a9e897..ec5105a 100644
--- a/net/base/x509_certificate.h
+++ b/net/base/x509_certificate.h
@@ -55,7 +55,8 @@ class X509Certificate : public base::RefCountedThreadSafe<X509Certificate> {
typedef std::vector<OSCertHandle> OSCertHandles;
// Predicate functor used in maps when X509Certificate is used as the key.
- class LessThan {
+ class LessThan
+ : public std::binary_function<X509Certificate*, X509Certificate*, bool> {
public:
bool operator() (X509Certificate* lhs, X509Certificate* rhs) const;
};
diff --git a/net/http/http_request_info.cc b/net/http/http_request_info.cc
deleted file mode 100644
index 8ab3096..0000000
--- a/net/http/http_request_info.cc
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "net/http/http_request_info.h"
-
-namespace net {
-
-HttpRequestInfo::HttpRequestInfo()
- : load_flags(0),
- priority(LOWEST),
- motivation(NORMAL_MOTIVATION) {
-}
-
-HttpRequestInfo::~HttpRequestInfo() {}
-
-} // namespace net
diff --git a/net/http/http_request_info.h b/net/http/http_request_info.h
index f740d7c..3c072c0 100644
--- a/net/http/http_request_info.h
+++ b/net/http/http_request_info.h
@@ -16,6 +16,7 @@
namespace net {
struct HttpRequestInfo {
+ public:
enum RequestMotivation{
// TODO(mbelshe): move these into Client Socket.
PRECONNECT_MOTIVATED, // This request was motivated by a prefetch.
@@ -23,8 +24,11 @@ struct HttpRequestInfo {
NORMAL_MOTIVATION // No special motivation associated with the request.
};
- HttpRequestInfo();
- ~HttpRequestInfo();
+ HttpRequestInfo()
+ : load_flags(0),
+ priority(LOWEST),
+ motivation(NORMAL_MOTIVATION) {
+ }
// The requested URL.
GURL url;
diff --git a/net/net.gyp b/net/net.gyp
index 02e1bcd..1ce4608 100644
--- a/net/net.gyp
+++ b/net/net.gyp
@@ -49,7 +49,6 @@
'base/cookie_monster.h',
'base/cookie_options.h',
'base/cookie_policy.h',
- 'base/cookie_store.cc',
'base/cookie_store.h',
'base/data_url.cc',
'base/data_url.h',
@@ -433,7 +432,6 @@
'http/http_network_transaction.h',
'http/http_request_headers.cc',
'http/http_request_headers.h',
- 'http/http_request_info.cc',
'http/http_request_info.h',
'http/http_response_body_drainer.cc',
'http/http_response_body_drainer.h',
diff --git a/net/server/http_server_request_info.h b/net/server/http_server_request_info.h
index 63abab5..9c362e2 100644
--- a/net/server/http_server_request_info.h
+++ b/net/server/http_server_request_info.h
@@ -9,6 +9,8 @@
#include <string>
#include <map>
+#include "net/http/http_request_info.h"
+
// Meta information about an HTTP request.
// This is geared toward servers in that it keeps a map of the headers and
// values rather than just a list of header strings (which net::HttpRequestInfo
diff --git a/net/socket/client_socket_pool_histograms.h b/net/socket/client_socket_pool_histograms.h
index 41aad57..9c12e5d 100644
--- a/net/socket/client_socket_pool_histograms.h
+++ b/net/socket/client_socket_pool_histograms.h
@@ -8,8 +8,8 @@
#include <string>
-#include "base/time.h"
#include "base/ref_counted.h"
+#include "base/time.h"
class Histogram;
diff --git a/net/socket_stream/socket_stream_job.cc b/net/socket_stream/socket_stream_job.cc
index 0913015..c8849a5 100644
--- a/net/socket_stream/socket_stream_job.cc
+++ b/net/socket_stream/socket_stream_job.cc
@@ -24,38 +24,4 @@ SocketStreamJob* SocketStreamJob::CreateSocketStreamJob(
return GetJobManager()->CreateJob(url, delegate);
}
-SocketStreamJob::SocketStreamJob() {}
-
-SocketStream::UserData* SocketStreamJob::GetUserData(const void* key) const {
- return socket_->GetUserData(key);
-}
-
-void SocketStreamJob::SetUserData(const void* key,
- SocketStream::UserData* data) {
- socket_->SetUserData(key, data);
-}
-
-void SocketStreamJob::Connect() {
- socket_->Connect();
-}
-
-bool SocketStreamJob::SendData(const char* data, int len) {
- return socket_->SendData(data, len);
-}
-
-void SocketStreamJob::Close() {
- socket_->Close();
-}
-
-void SocketStreamJob::RestartWithAuth(const string16& username,
- const string16& password) {
- socket_->RestartWithAuth(username, password);
-}
-
-void SocketStreamJob::DetachDelegate() {
- socket_->DetachDelegate();
-}
-
-SocketStreamJob::~SocketStreamJob() {}
-
} // namespace net
diff --git a/net/socket_stream/socket_stream_job.h b/net/socket_stream/socket_stream_job.h
index a301709..89e0c36 100644
--- a/net/socket_stream/socket_stream_job.h
+++ b/net/socket_stream/socket_stream_job.h
@@ -34,13 +34,17 @@ class SocketStreamJob : public base::RefCountedThreadSafe<SocketStreamJob> {
static SocketStreamJob* CreateSocketStreamJob(
const GURL& url, SocketStream::Delegate* delegate);
- SocketStreamJob();
+ SocketStreamJob() {}
void InitSocketStream(SocketStream* socket) {
socket_ = socket;
}
- virtual SocketStream::UserData* GetUserData(const void* key) const;
- virtual void SetUserData(const void* key, SocketStream::UserData* data);
+ virtual SocketStream::UserData *GetUserData(const void* key) const {
+ return socket_->GetUserData(key);
+ }
+ virtual void SetUserData(const void* key, SocketStream::UserData* data) {
+ socket_->SetUserData(key, data);
+ }
URLRequestContext* context() const {
return socket_->context();
@@ -49,20 +53,31 @@ class SocketStreamJob : public base::RefCountedThreadSafe<SocketStreamJob> {
socket_->set_context(context);
}
- virtual void Connect();
+ virtual void Connect() {
+ socket_->Connect();
+ }
- virtual bool SendData(const char* data, int len);
+ virtual bool SendData(const char* data, int len) {
+ return socket_->SendData(data, len);
+ }
- virtual void Close();
+ virtual void Close() {
+ socket_->Close();
+ }
- virtual void RestartWithAuth(const string16& username,
- const string16& password);
+ virtual void RestartWithAuth(
+ const string16& username,
+ const string16& password) {
+ socket_->RestartWithAuth(username, password);
+ }
- virtual void DetachDelegate();
+ virtual void DetachDelegate() {
+ socket_->DetachDelegate();
+ }
protected:
friend class base::RefCountedThreadSafe<SocketStreamJob>;
- virtual ~SocketStreamJob();
+ virtual ~SocketStreamJob() {}
scoped_refptr<SocketStream> socket_;