summaryrefslogtreecommitdiffstats
path: root/net/socket_stream
diff options
context:
space:
mode:
authortkent@chromium.org <tkent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-20 03:54:03 +0000
committertkent@chromium.org <tkent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-20 03:54:03 +0000
commit22e045faa6bc1faa16b5664aa896e9c107851761 (patch)
tree2051918751d9053de984b61b8ac3ed2d2ee92006 /net/socket_stream
parentd9343b3e87b143d3438eddabc3a9eeec65d39bd0 (diff)
downloadchromium_src-22e045faa6bc1faa16b5664aa896e9c107851761.zip
chromium_src-22e045faa6bc1faa16b5664aa896e9c107851761.tar.gz
chromium_src-22e045faa6bc1faa16b5664aa896e9c107851761.tar.bz2
Revert 224269 "Don't persist HPKP if PrivacyMode is enabled."
It broke Google Chrome ChromeOS bot. http://build.chromium.org/p/chromium.chrome/builders/Google%20Chrome%20ChromeOS/builds/58548/steps/compile/logs/stdio#error1 FAILED: g++ ... -c ../../net/socket/ssl_client_socket_nss.cc -o obj/net/socket/net.ssl_client_socket_nss.o ../../net/socket/ssl_client_socket_nss.cc: In member function 'int net::SSLClientSocketNSS::DoVerifyCertComplete(int)': ../../net/socket/ssl_client_socket_nss.cc:3445:64:error: no matching function for call to 'net::TransportSecurityState::GetDomainState(const string&, bool&, net::TransportSecurityState::DomainState*)' ../../net/socket/ssl_client_socket_nss.cc:3445:64: note: candidate is: ../../net/http/transport_security_state.h:212:8: note: bool net::TransportSecurityState::GetDomainState(const string&, bool, bool, net::TransportSecurityState::DomainState*) ../../net/http/transport_security_state.h:212:8: note: candidate expects 4 arguments, 3 provided > Don't persist HPKP if PrivacyMode is enabled. > > BUG=258667 > > Review URL: https://chromiumcodereview.appspot.com/19269012 TBR=mef@chromium.org Review URL: https://codereview.chromium.org/24251011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224275 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/socket_stream')
-rw-r--r--net/socket_stream/socket_stream.cc15
-rw-r--r--net/socket_stream/socket_stream.h7
-rw-r--r--net/socket_stream/socket_stream_job.cc8
3 files changed, 4 insertions, 26 deletions
diff --git a/net/socket_stream/socket_stream.cc b/net/socket_stream/socket_stream.cc
index e50d09c..699c820 100644
--- a/net/socket_stream/socket_stream.cc
+++ b/net/socket_stream/socket_stream.cc
@@ -132,14 +132,6 @@ bool SocketStream::is_secure() const {
return url_.SchemeIs("wss");
}
-GURL SocketStream::GetURLForCookies(const GURL& url) {
- std::string scheme = url.SchemeIs("wss") ? "https" : "http";
- url_canon::Replacements<char> replacements;
- replacements.SetScheme(scheme.c_str(),
- url_parse::Component(0, scheme.length()));
- return url.ReplaceComponents(replacements);
-}
-
void SocketStream::set_context(URLRequestContext* context) {
const URLRequestContext* prev_context = context_;
@@ -1335,12 +1327,9 @@ int SocketStream::HandleCertificateError(int result) {
ssl_socket->GetSSLInfo(&ssl_info);
TransportSecurityState::DomainState domain_state;
- const bool fatal =
- context_->transport_security_state() &&
- context_->transport_security_state()->GetDomainState(
- url_.host(),
+ const bool fatal = context_->transport_security_state() &&
+ context_->transport_security_state()->GetDomainState(url_.host(),
SSLConfigService::IsSNIAvailable(context_->ssl_config_service()),
- delegate_->CanGetCookies(this, url_for_cookies()),
&domain_state) &&
domain_state.ShouldSSLErrorsBeFatal();
diff --git a/net/socket_stream/socket_stream.h b/net/socket_stream/socket_stream.h
index 76c132e..90aeb8c 100644
--- a/net/socket_stream/socket_stream.h
+++ b/net/socket_stream/socket_stream.h
@@ -124,7 +124,6 @@ class NET_EXPORT SocketStream
void SetUserData(const void* key, UserData* data);
const GURL& url() const { return url_; }
- GURL url_for_cookies() const { return GetURLForCookies(url_); }
bool is_secure() const;
const AddressList& address_list() const { return addresses_; }
Delegate* delegate() const { return delegate_; }
@@ -181,12 +180,6 @@ class NET_EXPORT SocketStream
// actions on alert dialog or browser cached such kinds of user actions.
void ContinueDespiteError();
- // Returns the URL to be used for cookie policy checking. Note that
- // this may be different than |url|; for example, the cookie policy
- // for a ws:// URL is based upon the http:// scheme for that
- // host:port pair.
- static GURL GetURLForCookies(const GURL& url);
-
protected:
friend class base::RefCountedThreadSafe<SocketStream>;
virtual ~SocketStream();
diff --git a/net/socket_stream/socket_stream_job.cc b/net/socket_stream/socket_stream_job.cc
index 7c12cc8..9c13a8f 100644
--- a/net/socket_stream/socket_stream_job.cc
+++ b/net/socket_stream/socket_stream_job.cc
@@ -27,12 +27,8 @@ SocketStreamJob* SocketStreamJob::CreateSocketStreamJob(
SSLConfigService* ssl) {
GURL socket_url(url);
TransportSecurityState::DomainState domain_state;
- if (url.scheme() == "ws" && sts &&
- sts->GetDomainState(
- url.host(),
- SSLConfigService::IsSNIAvailable(ssl),
- delegate->CanGetCookies(NULL, SocketStream::GetURLForCookies(url)),
- &domain_state) &&
+ if (url.scheme() == "ws" && sts && sts->GetDomainState(
+ url.host(), SSLConfigService::IsSNIAvailable(ssl), &domain_state) &&
domain_state.ShouldUpgradeToSSL()) {
url_canon::Replacements<char> replacements;
static const char kNewScheme[] = "wss";