From 7cf4091e5e3eb7b3ee40c8fdc886226100b3a2e7 Mon Sep 17 00:00:00 2001
From: "erg@google.com" <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>
Date: Thu, 9 Dec 2010 18:25:03 +0000
Subject: Start deinlining non-empty virtual methods. (This will be
 automatically checked for in the future.)

BUG=none
TEST=compiles

Review URL: http://codereview.chromium.org/5574006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68746 0039d316-1c4b-4281-b951-d872f2087c98
---
 net/base/capturing_net_log.cc                   |  4 ++
 net/base/capturing_net_log.h                    |  2 +-
 net/base/cookie_monster.cc                      |  4 ++
 net/base/cookie_monster.h                       |  2 +-
 net/base/host_resolver.cc                       |  8 ++++
 net/base/host_resolver.h                        |  6 +--
 net/ftp/ftp_directory_listing_parser_ls.cc      |  4 ++
 net/ftp/ftp_directory_listing_parser_ls.h       |  2 +-
 net/ftp/ftp_directory_listing_parser_mlsd.cc    |  4 ++
 net/ftp/ftp_directory_listing_parser_mlsd.h     |  2 +-
 net/ftp/ftp_directory_listing_parser_netware.cc |  4 ++
 net/ftp/ftp_directory_listing_parser_netware.h  |  2 +-
 net/ftp/ftp_directory_listing_parser_vms.cc     |  4 ++
 net/ftp/ftp_directory_listing_parser_vms.h      |  2 +-
 net/ftp/ftp_directory_listing_parser_windows.cc |  4 ++
 net/ftp/ftp_directory_listing_parser_windows.h  |  2 +-
 net/http/http_auth_handler.cc                   |  8 ++++
 net/http/http_auth_handler.h                    |  4 +-
 net/http/http_stream_request.cc                 | 12 +++++
 net/http/http_stream_request.h                  |  8 ++--
 net/net.gyp                                     |  1 +
 net/server/http_listen_socket.cc                |  8 ++++
 net/server/http_listen_socket.h                 |  4 +-
 net/socket/socks_client_socket_pool.cc          | 12 +++++
 net/socket/socks_client_socket_pool.h           | 12 ++---
 net/socket/ssl_client_socket.cc                 | 62 +++++++++++++++++++++++++
 net/socket/ssl_client_socket.h                  | 55 +++++-----------------
 net/socket/tcp_client_socket_libevent.cc        |  4 ++
 net/socket/tcp_client_socket_libevent.h         |  2 +-
 net/socket/tcp_client_socket_pool.cc            | 31 +++++++++++++
 net/socket/tcp_client_socket_pool.h             | 26 ++---------
 net/spdy/spdy_http_stream.cc                    | 26 +++++++++++
 net/spdy/spdy_http_stream.h                     | 20 +++-----
 33 files changed, 242 insertions(+), 109 deletions(-)
 create mode 100644 net/socket/ssl_client_socket.cc

(limited to 'net')

diff --git a/net/base/capturing_net_log.cc b/net/base/capturing_net_log.cc
index e785990..fccd5ae 100644
--- a/net/base/capturing_net_log.cc
+++ b/net/base/capturing_net_log.cc
@@ -38,6 +38,10 @@ uint32 CapturingNetLog::NextID() {
   return base::subtle::NoBarrier_AtomicIncrement(&last_id_, 1);
 }
 
+NetLog::LogLevel CapturingNetLog::GetLogLevel() const {
+  return LOG_ALL_BUT_BYTES;
+}
+
 void CapturingNetLog::GetEntries(EntryList* entry_list) const {
   AutoLock lock(lock_);
   *entry_list = entries_;
diff --git a/net/base/capturing_net_log.h b/net/base/capturing_net_log.h
index 3b6a39e..9254725 100644
--- a/net/base/capturing_net_log.h
+++ b/net/base/capturing_net_log.h
@@ -54,7 +54,7 @@ class CapturingNetLog : public NetLog {
                         EventPhase phase,
                         EventParameters* extra_parameters);
   virtual uint32 NextID();
-  virtual LogLevel GetLogLevel() const { return LOG_ALL_BUT_BYTES; }
+  virtual LogLevel GetLogLevel() const;
 
   // Returns the list of all entries in the log.
   void GetEntries(EntryList* entry_list) const;
diff --git a/net/base/cookie_monster.cc b/net/base/cookie_monster.cc
index 04de3ca..8eb3a49 100644
--- a/net/base/cookie_monster.cc
+++ b/net/base/cookie_monster.cc
@@ -1323,6 +1323,10 @@ void CookieMonster::DeleteCookie(const GURL& url,
   }
 }
 
+CookieMonster* CookieMonster::GetCookieMonster() {
+  return this;
+}
+
 CookieList CookieMonster::GetAllCookies() {
   AutoLock autolock(lock_);
   InitIfNecessary();
diff --git a/net/base/cookie_monster.h b/net/base/cookie_monster.h
index 2e9614e..a985176 100644
--- a/net/base/cookie_monster.h
+++ b/net/base/cookie_monster.h
@@ -146,7 +146,7 @@ class CookieMonster : public CookieStore {
   // Deletes all cookies with that might apply to |url| that has |cookie_name|.
   virtual void DeleteCookie(const GURL& url, const std::string& cookie_name);
 
-  virtual CookieMonster* GetCookieMonster() { return this; }
+  virtual CookieMonster* GetCookieMonster();
 
   // Sets a cookie given explicit user-provided cookie attributes. The cookie
   // name, value, domain, etc. are each provided as separate strings. This
diff --git a/net/base/host_resolver.cc b/net/base/host_resolver.cc
index fbd63bd..a8b642a 100644
--- a/net/base/host_resolver.cc
+++ b/net/base/host_resolver.cc
@@ -25,6 +25,14 @@ HostResolver::HostResolver() {
 HostResolver::~HostResolver() {
 }
 
+AddressFamily HostResolver::GetDefaultAddressFamily() const {
+  return net::ADDRESS_FAMILY_UNSPECIFIED;
+}
+
+HostResolverImpl* HostResolver::GetAsHostResolverImpl() {
+  return NULL;
+}
+
 SingleRequestHostResolver::SingleRequestHostResolver(HostResolver* resolver)
     : resolver_(resolver),
       cur_request_(NULL),
diff --git a/net/base/host_resolver.h b/net/base/host_resolver.h
index 471ad8a..4fc5c89 100644
--- a/net/base/host_resolver.h
+++ b/net/base/host_resolver.h
@@ -170,14 +170,12 @@ class HostResolver {
   // results to AF_INET by passing in ADDRESS_FAMILY_IPV4, or to
   // AF_INET6 by passing in ADDRESS_FAMILY_IPV6.
   virtual void SetDefaultAddressFamily(AddressFamily address_family) {}
-  virtual AddressFamily GetDefaultAddressFamily() const {
-    return net::ADDRESS_FAMILY_UNSPECIFIED;
-  }
+  virtual AddressFamily GetDefaultAddressFamily() const;
 
   // Returns |this| cast to a HostResolverImpl*, or NULL if the subclass
   // is not compatible with HostResolverImpl. Used primarily to expose
   // additional functionality on the about:net-internals page.
-  virtual HostResolverImpl* GetAsHostResolverImpl() { return NULL; }
+  virtual HostResolverImpl* GetAsHostResolverImpl();
 
   // Does additional cleanup prior to destruction.
   virtual void Shutdown() {}
diff --git a/net/ftp/ftp_directory_listing_parser_ls.cc b/net/ftp/ftp_directory_listing_parser_ls.cc
index 40546c8..9660eab 100644
--- a/net/ftp/ftp_directory_listing_parser_ls.cc
+++ b/net/ftp/ftp_directory_listing_parser_ls.cc
@@ -91,6 +91,10 @@ FtpDirectoryListingParserLs::FtpDirectoryListingParserLs(
 
 FtpDirectoryListingParserLs::~FtpDirectoryListingParserLs() {}
 
+FtpServerType FtpDirectoryListingParserLs::GetServerType() const {
+  return SERVER_LS;
+}
+
 bool FtpDirectoryListingParserLs::ConsumeLine(const string16& line) {
   if (line.empty() && !received_nonempty_line_) {
     // Allow empty lines only at the beginning of the listing. For example VMS
diff --git a/net/ftp/ftp_directory_listing_parser_ls.h b/net/ftp/ftp_directory_listing_parser_ls.h
index 6cb3655..3004f70 100644
--- a/net/ftp/ftp_directory_listing_parser_ls.h
+++ b/net/ftp/ftp_directory_listing_parser_ls.h
@@ -23,7 +23,7 @@ class FtpDirectoryListingParserLs : public FtpDirectoryListingParser {
   virtual ~FtpDirectoryListingParserLs();
 
   // FtpDirectoryListingParser methods:
-  virtual FtpServerType GetServerType() const { return SERVER_LS; }
+  virtual FtpServerType GetServerType() const;
   virtual bool ConsumeLine(const string16& line);
   virtual bool OnEndOfInput();
   virtual bool EntryAvailable() const;
diff --git a/net/ftp/ftp_directory_listing_parser_mlsd.cc b/net/ftp/ftp_directory_listing_parser_mlsd.cc
index d8ae618..f2558415 100644
--- a/net/ftp/ftp_directory_listing_parser_mlsd.cc
+++ b/net/ftp/ftp_directory_listing_parser_mlsd.cc
@@ -60,6 +60,10 @@ FtpDirectoryListingParserMlsd::FtpDirectoryListingParserMlsd() {}
 
 FtpDirectoryListingParserMlsd::~FtpDirectoryListingParserMlsd() {}
 
+FtpServerType FtpDirectoryListingParserMlsd::GetServerType() const {
+  return SERVER_MLSD;
+}
+
 bool FtpDirectoryListingParserMlsd::ConsumeLine(const string16& line) {
   // The first space indicates where the filename begins.
   string16::size_type first_space_pos = line.find(' ');
diff --git a/net/ftp/ftp_directory_listing_parser_mlsd.h b/net/ftp/ftp_directory_listing_parser_mlsd.h
index c3e3acf..5c11fa0 100644
--- a/net/ftp/ftp_directory_listing_parser_mlsd.h
+++ b/net/ftp/ftp_directory_listing_parser_mlsd.h
@@ -20,7 +20,7 @@ class FtpDirectoryListingParserMlsd : public FtpDirectoryListingParser {
   virtual ~FtpDirectoryListingParserMlsd();
 
   // FtpDirectoryListingParser methods:
-  virtual FtpServerType GetServerType() const { return SERVER_MLSD; }
+  virtual FtpServerType GetServerType() const;
   virtual bool ConsumeLine(const string16& line);
   virtual bool OnEndOfInput();
   virtual bool EntryAvailable() const;
diff --git a/net/ftp/ftp_directory_listing_parser_netware.cc b/net/ftp/ftp_directory_listing_parser_netware.cc
index ab7fb6d..1801a4a 100644
--- a/net/ftp/ftp_directory_listing_parser_netware.cc
+++ b/net/ftp/ftp_directory_listing_parser_netware.cc
@@ -42,6 +42,10 @@ FtpDirectoryListingParserNetware::FtpDirectoryListingParserNetware(
 
 FtpDirectoryListingParserNetware::~FtpDirectoryListingParserNetware() {}
 
+FtpServerType FtpDirectoryListingParserNetware::GetServerType() const {
+  return SERVER_NETWARE;
+}
+
 bool FtpDirectoryListingParserNetware::ConsumeLine(const string16& line) {
   if (!received_first_line_) {
     received_first_line_ = true;
diff --git a/net/ftp/ftp_directory_listing_parser_netware.h b/net/ftp/ftp_directory_listing_parser_netware.h
index 5fdcd84..48aebfc 100644
--- a/net/ftp/ftp_directory_listing_parser_netware.h
+++ b/net/ftp/ftp_directory_listing_parser_netware.h
@@ -23,7 +23,7 @@ class FtpDirectoryListingParserNetware : public FtpDirectoryListingParser {
   virtual ~FtpDirectoryListingParserNetware();
 
   // FtpDirectoryListingParser methods:
-  virtual FtpServerType GetServerType() const { return SERVER_NETWARE; }
+  virtual FtpServerType GetServerType() const;
   virtual bool ConsumeLine(const string16& line);
   virtual bool OnEndOfInput();
   virtual bool EntryAvailable() const;
diff --git a/net/ftp/ftp_directory_listing_parser_vms.cc b/net/ftp/ftp_directory_listing_parser_vms.cc
index ed12665..c74dad0 100644
--- a/net/ftp/ftp_directory_listing_parser_vms.cc
+++ b/net/ftp/ftp_directory_listing_parser_vms.cc
@@ -170,6 +170,10 @@ FtpDirectoryListingParserVms::FtpDirectoryListingParserVms()
 
 FtpDirectoryListingParserVms::~FtpDirectoryListingParserVms() {}
 
+FtpServerType FtpDirectoryListingParserVms::GetServerType() const {
+  return SERVER_VMS;
+}
+
 bool FtpDirectoryListingParserVms::ConsumeLine(const string16& line) {
   switch (state_) {
     case STATE_INITIAL:
diff --git a/net/ftp/ftp_directory_listing_parser_vms.h b/net/ftp/ftp_directory_listing_parser_vms.h
index 12f8dc7..118365d 100644
--- a/net/ftp/ftp_directory_listing_parser_vms.h
+++ b/net/ftp/ftp_directory_listing_parser_vms.h
@@ -19,7 +19,7 @@ class FtpDirectoryListingParserVms : public FtpDirectoryListingParser {
   virtual ~FtpDirectoryListingParserVms();
 
   // FtpDirectoryListingParser methods:
-  virtual FtpServerType GetServerType() const { return SERVER_VMS; }
+  virtual FtpServerType GetServerType() const;
   virtual bool ConsumeLine(const string16& line);
   virtual bool OnEndOfInput();
   virtual bool EntryAvailable() const;
diff --git a/net/ftp/ftp_directory_listing_parser_windows.cc b/net/ftp/ftp_directory_listing_parser_windows.cc
index e3211739..7bce556 100644
--- a/net/ftp/ftp_directory_listing_parser_windows.cc
+++ b/net/ftp/ftp_directory_listing_parser_windows.cc
@@ -76,6 +76,10 @@ FtpDirectoryListingParserWindows::FtpDirectoryListingParserWindows() {}
 
 FtpDirectoryListingParserWindows::~FtpDirectoryListingParserWindows() {}
 
+FtpServerType FtpDirectoryListingParserWindows::GetServerType() const {
+  return SERVER_WINDOWS;
+}
+
 bool FtpDirectoryListingParserWindows::ConsumeLine(const string16& line) {
   std::vector<string16> columns;
   base::SplitString(CollapseWhitespace(line, false), ' ', &columns);
diff --git a/net/ftp/ftp_directory_listing_parser_windows.h b/net/ftp/ftp_directory_listing_parser_windows.h
index 91ffe36..1f029af 100644
--- a/net/ftp/ftp_directory_listing_parser_windows.h
+++ b/net/ftp/ftp_directory_listing_parser_windows.h
@@ -18,7 +18,7 @@ class FtpDirectoryListingParserWindows : public FtpDirectoryListingParser {
   virtual ~FtpDirectoryListingParserWindows();
 
   // FtpDirectoryListingParser methods:
-  virtual FtpServerType GetServerType() const { return SERVER_WINDOWS; }
+  virtual FtpServerType GetServerType() const;
   virtual bool ConsumeLine(const string16& line);
   virtual bool OnEndOfInput();
   virtual bool EntryAvailable() const;
diff --git a/net/http/http_auth_handler.cc b/net/http/http_auth_handler.cc
index d6e6a62..e653e99 100644
--- a/net/http/http_auth_handler.cc
+++ b/net/http/http_auth_handler.cc
@@ -99,6 +99,14 @@ int HttpAuthHandler::GenerateAuthToken(const string16* username,
   return rv;
 }
 
+bool HttpAuthHandler::NeedsIdentity() {
+  return true;
+}
+
+bool HttpAuthHandler::AllowsDefaultCredentials() {
+  return false;
+}
+
 void HttpAuthHandler::OnGenerateAuthTokenComplete(int rv) {
   CompletionCallback* callback = original_callback_;
   FinishGenerateAuthToken();
diff --git a/net/http/http_auth_handler.h b/net/http/http_auth_handler.h
index 908b065..f5ce1be 100644
--- a/net/http/http_auth_handler.h
+++ b/net/http/http_auth_handler.h
@@ -123,14 +123,14 @@ class HttpAuthHandler {
   // requires an identity.
   // TODO(wtc): Find a better way to handle a multi-round challenge-response
   // sequence used by a connection-based authentication scheme.
-  virtual bool NeedsIdentity() { return true; }
+  virtual bool NeedsIdentity();
 
   // Returns whether the default credentials may be used for the |origin| passed
   // into |InitFromChallenge|. If true, the user does not need to be prompted
   // for username and password to establish credentials.
   // NOTE: SSO is a potential security risk.
   // TODO(cbentzel): Add a pointer to Firefox documentation about risk.
-  virtual bool AllowsDefaultCredentials() { return false; }
+  virtual bool AllowsDefaultCredentials();
 
  protected:
   enum Property {
diff --git a/net/http/http_stream_request.cc b/net/http/http_stream_request.cc
index 62cb3d7..3f6b419 100644
--- a/net/http/http_stream_request.cc
+++ b/net/http/http_stream_request.cc
@@ -148,6 +148,18 @@ LoadState HttpStreamRequest::GetLoadState() const {
   }
 }
 
+bool HttpStreamRequest::was_alternate_protocol_available() const {
+  return was_alternate_protocol_available_;
+}
+
+bool HttpStreamRequest::was_npn_negotiated() const {
+  return was_npn_negotiated_;
+}
+
+bool HttpStreamRequest::using_spdy() const {
+  return using_spdy_;
+}
+
 void HttpStreamRequest::GetSSLInfo() {
   DCHECK(using_ssl_);
   DCHECK(!establishing_tunnel_);
diff --git a/net/http/http_stream_request.h b/net/http/http_stream_request.h
index d0decb4..51559a7 100644
--- a/net/http/http_stream_request.h
+++ b/net/http/http_stream_request.h
@@ -69,11 +69,9 @@ class HttpStreamRequest : public StreamRequest {
                                          const string16& password);
   virtual LoadState GetLoadState() const;
 
-  virtual bool was_alternate_protocol_available() const {
-      return was_alternate_protocol_available_;
-  }
-  virtual bool was_npn_negotiated() const { return was_npn_negotiated_; }
-  virtual bool using_spdy() const { return using_spdy_; }
+  virtual bool was_alternate_protocol_available() const;
+  virtual bool was_npn_negotiated() const;
+  virtual bool using_spdy() const;
 
  private:
   enum AlternateProtocolMode {
diff --git a/net/net.gyp b/net/net.gyp
index 8004873..065a39d 100644
--- a/net/net.gyp
+++ b/net/net.gyp
@@ -591,6 +591,7 @@
         'socket/socks_client_socket.h',
         'socket/socks_client_socket_pool.cc',
         'socket/socks_client_socket_pool.h',
+        'socket/ssl_client_socket.cc',
         'socket/ssl_client_socket.h',
         'socket/ssl_client_socket_mac.cc',
         'socket/ssl_client_socket_mac.h',
diff --git a/net/server/http_listen_socket.cc b/net/server/http_listen_socket.cc
index f35582b..161b6f6 100644
--- a/net/server/http_listen_socket.cc
+++ b/net/server/http_listen_socket.cc
@@ -310,6 +310,14 @@ bool HttpListenSocket::ParseHeaders(HttpServerRequestInfo* info) {
   return false;
 }
 
+void HttpListenSocket::Close() {
+  ListenSocket::Close();
+}
+
+void HttpListenSocket::Listen() {
+  ListenSocket::Listen();
+}
+
 void HttpListenSocket::DidAccept(ListenSocket* server,
                                  ListenSocket* connection) {
   connection->AddRef();
diff --git a/net/server/http_listen_socket.h b/net/server/http_listen_socket.h
index c917eaf..8b0bbc2 100644
--- a/net/server/http_listen_socket.h
+++ b/net/server/http_listen_socket.h
@@ -44,8 +44,8 @@ class HttpListenSocket : public ListenSocket,
   void Send404();
   void Send500(const std::string& message);
 
-  virtual void Close() { ListenSocket::Close(); }
-  virtual void Listen() { ListenSocket::Listen(); }
+  virtual void Close();
+  virtual void Listen();
 
   // ListenSocketDelegate
   virtual void DidAccept(ListenSocket* server, ListenSocket* connection);
diff --git a/net/socket/socks_client_socket_pool.cc b/net/socket/socks_client_socket_pool.cc
index 6d9e814c..4db8c5b 100644
--- a/net/socket/socks_client_socket_pool.cc
+++ b/net/socket/socks_client_socket_pool.cc
@@ -236,6 +236,10 @@ void SOCKSClientSocketPool::CloseIdleSockets() {
   base_.CloseIdleSockets();
 }
 
+int SOCKSClientSocketPool::IdleSocketCount() const {
+  return base_.idle_socket_count();
+}
+
 int SOCKSClientSocketPool::IdleSocketCountInGroup(
     const std::string& group_name) const {
   return base_.IdleSocketCountInGroup(group_name);
@@ -261,4 +265,12 @@ DictionaryValue* SOCKSClientSocketPool::GetInfoAsValue(
   return dict;
 }
 
+base::TimeDelta SOCKSClientSocketPool::ConnectionTimeout() const {
+  return base_.ConnectionTimeout();
+}
+
+ClientSocketPoolHistograms* SOCKSClientSocketPool::histograms() const {
+  return base_.histograms();
+};
+
 }  // namespace net
diff --git a/net/socket/socks_client_socket_pool.h b/net/socket/socks_client_socket_pool.h
index 96eb4cf..3ba71546 100644
--- a/net/socket/socks_client_socket_pool.h
+++ b/net/socket/socks_client_socket_pool.h
@@ -138,9 +138,7 @@ class SOCKSClientSocketPool : public ClientSocketPool {
 
   virtual void CloseIdleSockets();
 
-  virtual int IdleSocketCount() const {
-    return base_.idle_socket_count();
-  }
+  virtual int IdleSocketCount() const;
 
   virtual int IdleSocketCountInGroup(const std::string& group_name) const;
 
@@ -151,13 +149,9 @@ class SOCKSClientSocketPool : public ClientSocketPool {
                                           const std::string& type,
                                           bool include_nested_pools) const;
 
-  virtual base::TimeDelta ConnectionTimeout() const {
-    return base_.ConnectionTimeout();
-  }
+  virtual base::TimeDelta ConnectionTimeout() const;
 
-  virtual ClientSocketPoolHistograms* histograms() const {
-    return base_.histograms();
-  };
+  virtual ClientSocketPoolHistograms* histograms() const;
 
  private:
   typedef ClientSocketPoolBase<SOCKSSocketParams> PoolBase;
diff --git a/net/socket/ssl_client_socket.cc b/net/socket/ssl_client_socket.cc
new file mode 100644
index 0000000..5635ad5
--- /dev/null
+++ b/net/socket/ssl_client_socket.cc
@@ -0,0 +1,62 @@
+// 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/socket/ssl_client_socket.h"
+
+namespace net {
+
+SSLClientSocket::SSLClientSocket()
+    : was_npn_negotiated_(false),
+      was_spdy_negotiated_(false) {
+}
+
+SSLClientSocket::NextProto SSLClientSocket::NextProtoFromString(
+    const std::string& proto_string) {
+  if (proto_string == "http1.1" || proto_string == "http/1.1") {
+    return kProtoHTTP11;
+  } else if (proto_string == "spdy/1") {
+    return kProtoSPDY1;
+  } else if (proto_string == "spdy/2") {
+    return kProtoSPDY2;
+  } else {
+    return kProtoUnknown;
+  }
+}
+
+bool SSLClientSocket::IgnoreCertError(int error, int load_flags) {
+  if (error == OK || load_flags & LOAD_IGNORE_ALL_CERT_ERRORS)
+    return true;
+
+  if (error == ERR_CERT_COMMON_NAME_INVALID &&
+      (load_flags & LOAD_IGNORE_CERT_COMMON_NAME_INVALID))
+    return true;
+
+  if (error == ERR_CERT_DATE_INVALID &&
+      (load_flags & LOAD_IGNORE_CERT_DATE_INVALID))
+    return true;
+
+  if (error == ERR_CERT_AUTHORITY_INVALID &&
+      (load_flags & LOAD_IGNORE_CERT_AUTHORITY_INVALID))
+    return true;
+
+  return false;
+}
+
+bool SSLClientSocket::was_npn_negotiated() const {
+  return was_npn_negotiated_;
+}
+
+bool SSLClientSocket::set_was_npn_negotiated(bool negotiated) {
+  return was_npn_negotiated_ = negotiated;
+}
+
+bool SSLClientSocket::was_spdy_negotiated() const {
+  return was_spdy_negotiated_;
+}
+
+bool SSLClientSocket::set_was_spdy_negotiated(bool negotiated) {
+  return was_spdy_negotiated_ = negotiated;
+}
+
+}  // namespace net
diff --git a/net/socket/ssl_client_socket.h b/net/socket/ssl_client_socket.h
index c3eb0da..1b424fb 100644
--- a/net/socket/ssl_client_socket.h
+++ b/net/socket/ssl_client_socket.h
@@ -44,8 +44,8 @@ class DNSSECProvider {
 //
 class SSLClientSocket : public ClientSocket {
  public:
-  SSLClientSocket() : was_npn_negotiated_(false), was_spdy_negotiated_(false) {
-  }
+  SSLClientSocket();
+
   // Next Protocol Negotiation (NPN) allows a TLS client and server to come to
   // an agreement about the application level protocol to speak over a
   // connection.
@@ -84,52 +84,19 @@ class SSLClientSocket : public ClientSocket {
   //                          supported list.
   virtual NextProtoStatus GetNextProto(std::string* proto) = 0;
 
-  static NextProto NextProtoFromString(const std::string& proto_string) {
-    if (proto_string == "http1.1" || proto_string == "http/1.1") {
-      return kProtoHTTP11;
-    } else if (proto_string == "spdy/1") {
-      return kProtoSPDY1;
-    } else if (proto_string == "spdy/2") {
-      return kProtoSPDY2;
-    } else {
-      return kProtoUnknown;
-    }
-  }
-
-  static bool IgnoreCertError(int error, int load_flags) {
-    if (error == OK || load_flags & LOAD_IGNORE_ALL_CERT_ERRORS)
-      return true;
-
-    if (error == ERR_CERT_COMMON_NAME_INVALID &&
-        (load_flags & LOAD_IGNORE_CERT_COMMON_NAME_INVALID))
-      return true;
-    if(error == ERR_CERT_DATE_INVALID &&
-            (load_flags & LOAD_IGNORE_CERT_DATE_INVALID))
-      return true;
-    if(error == ERR_CERT_AUTHORITY_INVALID &&
-            (load_flags & LOAD_IGNORE_CERT_AUTHORITY_INVALID))
-      return true;
-
-    return false;
-  }
-
-  virtual bool was_npn_negotiated() const {
-    return was_npn_negotiated_;
-  }
-
-  virtual bool set_was_npn_negotiated(bool negotiated) {
-    return was_npn_negotiated_ = negotiated;
-  }
+  static NextProto NextProtoFromString(const std::string& proto_string);
+
+  static bool IgnoreCertError(int error, int load_flags);
+
+  virtual bool was_npn_negotiated() const;
+
+  virtual bool set_was_npn_negotiated(bool negotiated);
 
   virtual void UseDNSSEC(DNSSECProvider*) { }
 
-  virtual bool was_spdy_negotiated() const {
-    return was_spdy_negotiated_;
-  }
+  virtual bool was_spdy_negotiated() const;
 
-  virtual bool set_was_spdy_negotiated(bool negotiated) {
-    return was_spdy_negotiated_ = negotiated;
-  }
+  virtual bool set_was_spdy_negotiated(bool negotiated);
 
  private:
   // True if NPN was responded to, independent of selecting SPDY or HTTP.
diff --git a/net/socket/tcp_client_socket_libevent.cc b/net/socket/tcp_client_socket_libevent.cc
index a3fb281..bf6d3af 100644
--- a/net/socket/tcp_client_socket_libevent.cc
+++ b/net/socket/tcp_client_socket_libevent.cc
@@ -609,6 +609,10 @@ int TCPClientSocketLibevent::GetPeerAddress(AddressList* address) const {
   return OK;
 }
 
+const BoundNetLog& TCPClientSocketLibevent::NetLog() const {
+  return net_log_;
+}
+
 void TCPClientSocketLibevent::SetSubresourceSpeculation() {
   use_history_.set_subresource_speculation();
 }
diff --git a/net/socket/tcp_client_socket_libevent.h b/net/socket/tcp_client_socket_libevent.h
index a89c5b3..e0e6e31 100644
--- a/net/socket/tcp_client_socket_libevent.h
+++ b/net/socket/tcp_client_socket_libevent.h
@@ -45,7 +45,7 @@ class TCPClientSocketLibevent : public ClientSocket, NonThreadSafe {
   virtual bool IsConnected() const;
   virtual bool IsConnectedAndIdle() const;
   virtual int GetPeerAddress(AddressList* address) const;
-  virtual const BoundNetLog& NetLog() const { return net_log_; }
+  virtual const BoundNetLog& NetLog() const;
   virtual void SetSubresourceSpeculation();
   virtual void SetOmniboxSpeculation();
   virtual bool WasEverUsed() const;
diff --git a/net/socket/tcp_client_socket_pool.cc b/net/socket/tcp_client_socket_pool.cc
index 8ec9cac..5f017ea 100644
--- a/net/socket/tcp_client_socket_pool.cc
+++ b/net/socket/tcp_client_socket_pool.cc
@@ -38,6 +38,18 @@ TCPSocketParams::TCPSocketParams(const std::string& host, int port,
 
 TCPSocketParams::~TCPSocketParams() {}
 
+void TCPSocketParams::Initialize(RequestPriority priority,
+                                 const GURL& referrer,
+                                 bool disable_resolver_cache) {
+  // The referrer is used by the DNS prefetch system to correlate resolutions
+  // with the page that triggered them. It doesn't impact the actual addresses
+  // that we resolve to.
+  destination_.set_referrer(referrer);
+  destination_.set_priority(priority);
+  if (disable_resolver_cache)
+    destination_.set_allow_cached_response(false);
+}
+
 // TCPConnectJobs will time out after this many seconds.  Note this is the total
 // time, including both host resolution and TCP connect() times.
 //
@@ -272,6 +284,10 @@ void TCPClientSocketPool::CloseIdleSockets() {
   base_.CloseIdleSockets();
 }
 
+int TCPClientSocketPool::IdleSocketCount() const {
+  return base_.idle_socket_count();
+}
+
 int TCPClientSocketPool::IdleSocketCountInGroup(
     const std::string& group_name) const {
   return base_.IdleSocketCountInGroup(group_name);
@@ -282,4 +298,19 @@ LoadState TCPClientSocketPool::GetLoadState(
   return base_.GetLoadState(group_name, handle);
 }
 
+DictionaryValue* TCPClientSocketPool::GetInfoAsValue(
+    const std::string& name,
+    const std::string& type,
+    bool include_nested_pools) const {
+  return base_.GetInfoAsValue(name, type);
+}
+
+base::TimeDelta TCPClientSocketPool::ConnectionTimeout() const {
+  return base_.ConnectionTimeout();
+}
+
+ClientSocketPoolHistograms* TCPClientSocketPool::histograms() const {
+  return base_.histograms();
+}
+
 }  // namespace net
diff --git a/net/socket/tcp_client_socket_pool.h b/net/socket/tcp_client_socket_pool.h
index 08f0634f..e3986e5 100644
--- a/net/socket/tcp_client_socket_pool.h
+++ b/net/socket/tcp_client_socket_pool.h
@@ -39,15 +39,7 @@ class TCPSocketParams : public base::RefCounted<TCPSocketParams> {
   ~TCPSocketParams();
 
   void Initialize(RequestPriority priority, const GURL& referrer,
-                  bool disable_resolver_cache) {
-    // The referrer is used by the DNS prefetch system to correlate resolutions
-    // with the page that triggered them. It doesn't impact the actual addresses
-    // that we resolve to.
-    destination_.set_referrer(referrer);
-    destination_.set_priority(priority);
-    if (disable_resolver_cache)
-      destination_.set_allow_cached_response(false);
-  }
+                  bool disable_resolver_cache);
 
   HostResolver::RequestInfo destination_;
 
@@ -147,9 +139,7 @@ class TCPClientSocketPool : public ClientSocketPool {
 
   virtual void CloseIdleSockets();
 
-  virtual int IdleSocketCount() const {
-    return base_.idle_socket_count();
-  }
+  virtual int IdleSocketCount() const;
 
   virtual int IdleSocketCountInGroup(const std::string& group_name) const;
 
@@ -158,17 +148,11 @@ class TCPClientSocketPool : public ClientSocketPool {
 
   virtual DictionaryValue* GetInfoAsValue(const std::string& name,
                                           const std::string& type,
-                                          bool include_nested_pools) const {
-    return base_.GetInfoAsValue(name, type);
-  }
+                                          bool include_nested_pools) const;
 
-  virtual base::TimeDelta ConnectionTimeout() const {
-    return base_.ConnectionTimeout();
-  }
+  virtual base::TimeDelta ConnectionTimeout() const;
 
-  virtual ClientSocketPoolHistograms* histograms() const {
-    return base_.histograms();
-  }
+  virtual ClientSocketPoolHistograms* histograms() const;
 
  private:
   typedef ClientSocketPoolBase<TCPSocketParams> PoolBase;
diff --git a/net/spdy/spdy_http_stream.cc b/net/spdy/spdy_http_stream.cc
index 5d27ee1..75f8039 100644
--- a/net/spdy/spdy_http_stream.cc
+++ b/net/spdy/spdy_http_stream.cc
@@ -141,6 +141,32 @@ void SpdyHttpStream::Close(bool not_reusable) {
   Cancel();
 }
 
+HttpStream* SpdyHttpStream::RenewStreamForAuth() {
+  return NULL;
+}
+
+bool SpdyHttpStream::IsResponseBodyComplete() const {
+  if (!stream_)
+    return false;
+  return stream_->closed();
+}
+
+bool SpdyHttpStream::CanFindEndOfResponse() const {
+  return true;
+}
+
+bool SpdyHttpStream::IsMoreDataBuffered() const {
+  return false;
+}
+
+bool SpdyHttpStream::IsConnectionReused() const {
+  return spdy_session_->IsReused();
+}
+
+void SpdyHttpStream::SetConnectionReused() {
+  // SPDY doesn't need an indicator here.
+}
+
 int SpdyHttpStream::SendRequest(const HttpRequestHeaders& request_headers,
                                 UploadDataStream* request_body,
                                 HttpResponseInfo* response,
diff --git a/net/spdy/spdy_http_stream.h b/net/spdy/spdy_http_stream.h
index cd351cd..76649b2 100644
--- a/net/spdy/spdy_http_stream.h
+++ b/net/spdy/spdy_http_stream.h
@@ -55,20 +55,12 @@ class SpdyHttpStream : public SpdyStream::Delegate, public HttpStream {
                                int buf_len,
                                CompletionCallback* callback);
   virtual void Close(bool not_reusable);
-  virtual HttpStream* RenewStreamForAuth() { return NULL; }
-  virtual bool IsResponseBodyComplete() const {
-    if (!stream_)
-      return false;
-    return stream_->closed();
-  }
-  virtual bool CanFindEndOfResponse() const { return true; }
-  virtual bool IsMoreDataBuffered() const { return false; }
-  virtual bool IsConnectionReused() const {
-    return spdy_session_->IsReused();
-  }
-  virtual void SetConnectionReused() {
-    // SPDY doesn't need an indicator here.
-  }
+  virtual HttpStream* RenewStreamForAuth();
+  virtual bool IsResponseBodyComplete() const;
+  virtual bool CanFindEndOfResponse() const;
+  virtual bool IsMoreDataBuffered() const;
+  virtual bool IsConnectionReused() const;
+  virtual void SetConnectionReused();
   virtual void GetSSLInfo(SSLInfo* ssl_info);
   virtual void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info);
 
-- 
cgit v1.1