diff options
author | rch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-27 22:54:53 +0000 |
---|---|---|
committer | rch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-27 22:54:53 +0000 |
commit | d7c9f429c2a8d56e394f8b0f037158cb64736cb4 (patch) | |
tree | 0e230984a6f0f5ae4488795d81e321f616687bac /net | |
parent | 79440c5ed48b25cce5edce8c23a3b7722f78ae8d (diff) | |
download | chromium_src-d7c9f429c2a8d56e394f8b0f037158cb64736cb4.zip chromium_src-d7c9f429c2a8d56e394f8b0f037158cb64736cb4.tar.gz chromium_src-d7c9f429c2a8d56e394f8b0f037158cb64736cb4.tar.bz2 |
Rename the following SSLClientSocket methods to match the style guide:
wasNpnNegotiated() -> was_npn_negotiated()
setWasNpnNegotiated() -> set_was_npn_negotiated()
wasSpdyNegotiated() -> was_spdy_negotiated()
setWasSpdyNegotiated() -> set_was_spdy_negotiated()
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/3229004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57741 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/http/http_stream_request.cc | 4 | ||||
-rw-r--r-- | net/socket/socket_test_util.cc | 4 | ||||
-rw-r--r-- | net/socket/socket_test_util.h | 4 | ||||
-rw-r--r-- | net/socket/ssl_client_socket.h | 8 | ||||
-rw-r--r-- | net/socket/ssl_client_socket_pool.cc | 6 | ||||
-rw-r--r-- | net/socket/ssl_client_socket_pool_unittest.cc | 6 | ||||
-rw-r--r-- | net/spdy/spdy_session.cc | 2 |
7 files changed, 17 insertions, 17 deletions
diff --git a/net/http/http_stream_request.cc b/net/http/http_stream_request.cc index 000e013..1200794 100644 --- a/net/http/http_stream_request.cc +++ b/net/http/http_stream_request.cc @@ -563,9 +563,9 @@ int HttpStreamRequest::DoInitConnectionComplete(int result) { if (ssl_started && (result == OK || IsCertificateError(result))) { SSLClientSocket* ssl_socket = static_cast<SSLClientSocket*>(connection_->socket()); - if (ssl_socket->wasNpnNegotiated()) { + if (ssl_socket->was_npn_negotiated()) { was_npn_negotiated_ = true; - if (ssl_socket->wasSpdyNegotiated()) + if (ssl_socket->was_spdy_negotiated()) using_spdy_ = true; } if (force_spdy_over_ssl_ && force_spdy_always_) diff --git a/net/socket/socket_test_util.cc b/net/socket/socket_test_util.cc index 07d4206..46e0e55 100644 --- a/net/socket/socket_test_util.cc +++ b/net/socket/socket_test_util.cc @@ -517,13 +517,13 @@ SSLClientSocket::NextProtoStatus MockSSLClientSocket::GetNextProto( return data_->next_proto_status; } -bool MockSSLClientSocket::wasNpnNegotiated() const { +bool MockSSLClientSocket::was_npn_negotiated() const { if (is_npn_state_set_) return new_npn_value_; return data_->was_npn_negotiated; } -bool MockSSLClientSocket::setWasNpnNegotiated(bool negotiated) { +bool MockSSLClientSocket::set_was_npn_negotiated(bool negotiated) { is_npn_state_set_ = true; return new_npn_value_ = negotiated; } diff --git a/net/socket/socket_test_util.h b/net/socket/socket_test_util.h index b712215..f63dd6c 100644 --- a/net/socket/socket_test_util.h +++ b/net/socket/socket_test_util.h @@ -652,8 +652,8 @@ class MockSSLClientSocket : public MockClientSocket { // SSLClientSocket methods: virtual void GetSSLInfo(net::SSLInfo* ssl_info); virtual NextProtoStatus GetNextProto(std::string* proto); - virtual bool wasNpnNegotiated() const; - virtual bool setWasNpnNegotiated(bool negotiated); + virtual bool was_npn_negotiated() const; + virtual bool set_was_npn_negotiated(bool negotiated); // This MockSocket does not implement the manual async IO feature. virtual void OnReadComplete(const MockRead& data) { NOTIMPLEMENTED(); } diff --git a/net/socket/ssl_client_socket.h b/net/socket/ssl_client_socket.h index 9c8e84a..c4a063a 100644 --- a/net/socket/ssl_client_socket.h +++ b/net/socket/ssl_client_socket.h @@ -94,19 +94,19 @@ class SSLClientSocket : public ClientSocket { return false; } - virtual bool wasNpnNegotiated() const { + virtual bool was_npn_negotiated() const { return was_npn_negotiated_; } - virtual bool setWasNpnNegotiated(bool negotiated) { + virtual bool set_was_npn_negotiated(bool negotiated) { return was_npn_negotiated_ = negotiated; } - virtual bool wasSpdyNegotiated() const { + virtual bool was_spdy_negotiated() const { return was_spdy_negotiated_; } - virtual bool setWasSpdyNegotiated(bool negotiated) { + virtual bool set_was_spdy_negotiated(bool negotiated) { return was_spdy_negotiated_ = negotiated; } diff --git a/net/socket/ssl_client_socket_pool.cc b/net/socket/ssl_client_socket_pool.cc index 12d273d..cb321ab 100644 --- a/net/socket/ssl_client_socket_pool.cc +++ b/net/socket/ssl_client_socket_pool.cc @@ -282,7 +282,7 @@ int SSLConnectJob::DoSSLConnectComplete(int result) { // If we want spdy over npn, make sure it succeeded. if (status == SSLClientSocket::kNextProtoNegotiated) { - ssl_socket_->setWasNpnNegotiated(true); + ssl_socket_->set_was_npn_negotiated(true); SSLClientSocket::NextProto next_protocol = SSLClientSocket::NextProtoFromString(proto); // If we negotiated either version of SPDY, we must have @@ -290,10 +290,10 @@ int SSLConnectJob::DoSSLConnectComplete(int result) { // TODO(mbelshe): verify it was a protocol we advertised? if (next_protocol == SSLClientSocket::kProtoSPDY1 || next_protocol == SSLClientSocket::kProtoSPDY2) { - ssl_socket_->setWasSpdyNegotiated(true); + ssl_socket_->set_was_spdy_negotiated(true); } } - if (params_->want_spdy_over_npn() && !ssl_socket_->wasSpdyNegotiated()) + if (params_->want_spdy_over_npn() && !ssl_socket_->was_spdy_negotiated()) return ERR_NPN_NEGOTIATION_FAILED; // Spdy might be turned on by default, or it might be over npn. diff --git a/net/socket/ssl_client_socket_pool_unittest.cc b/net/socket/ssl_client_socket_pool_unittest.cc index 93ea2de..7681ed0 100644 --- a/net/socket/ssl_client_socket_pool_unittest.cc +++ b/net/socket/ssl_client_socket_pool_unittest.cc @@ -277,7 +277,7 @@ TEST_F(SSLClientSocketPoolTest, DirectWithNPN) { EXPECT_TRUE(handle.is_initialized()); EXPECT_TRUE(handle.socket()); SSLClientSocket* ssl_socket = static_cast<SSLClientSocket*>(handle.socket()); - EXPECT_TRUE(ssl_socket->wasNpnNegotiated()); + EXPECT_TRUE(ssl_socket->was_npn_negotiated()); } TEST_F(SSLClientSocketPoolTest, DirectNoSPDY) { @@ -329,7 +329,7 @@ TEST_F(SSLClientSocketPoolTest, DirectGotSPDY) { EXPECT_TRUE(handle.socket()); SSLClientSocket* ssl_socket = static_cast<SSLClientSocket*>(handle.socket()); - EXPECT_TRUE(ssl_socket->wasNpnNegotiated()); + EXPECT_TRUE(ssl_socket->was_npn_negotiated()); std::string proto; ssl_socket->GetNextProto(&proto); EXPECT_EQ(SSLClientSocket::NextProtoFromString(proto), @@ -360,7 +360,7 @@ TEST_F(SSLClientSocketPoolTest, DirectGotBonusSPDY) { EXPECT_TRUE(handle.socket()); SSLClientSocket* ssl_socket = static_cast<SSLClientSocket*>(handle.socket()); - EXPECT_TRUE(ssl_socket->wasNpnNegotiated()); + EXPECT_TRUE(ssl_socket->was_npn_negotiated()); std::string proto; ssl_socket->GetNextProto(&proto); EXPECT_EQ(SSLClientSocket::NextProtoFromString(proto), diff --git a/net/spdy/spdy_session.cc b/net/spdy/spdy_session.cc index 8738a6a..50a0a21 100644 --- a/net/spdy/spdy_session.cc +++ b/net/spdy/spdy_session.cc @@ -923,7 +923,7 @@ bool SpdySession::GetSSLInfo(SSLInfo* ssl_info, bool* was_npn_negotiated) { SSLClientSocket* ssl_socket = reinterpret_cast<SSLClientSocket*>(connection_->socket()); ssl_socket->GetSSLInfo(ssl_info); - *was_npn_negotiated = ssl_socket->wasNpnNegotiated(); + *was_npn_negotiated = ssl_socket->was_npn_negotiated(); return true; } return false; |