Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(695)

Side by Side Diff: net/socket_stream/socket_stream_job.cc

Issue 578553004: Remove the "snionly" concept from the HSTS preload. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ... Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/socket_stream/socket_stream.cc ('k') | net/spdy/spdy_session.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/socket_stream/socket_stream_job.h" 5 #include "net/socket_stream/socket_stream_job.h"
6 6
7 #include "base/memory/singleton.h" 7 #include "base/memory/singleton.h"
8 #include "net/http/transport_security_state.h" 8 #include "net/http/transport_security_state.h"
9 #include "net/socket_stream/socket_stream_job_manager.h" 9 #include "net/socket_stream/socket_stream_job_manager.h"
10 #include "net/ssl/ssl_config_service.h" 10 #include "net/ssl/ssl_config_service.h"
(...skipping 11 matching lines...) Expand all
22 // static 22 // static
23 SocketStreamJob* SocketStreamJob::CreateSocketStreamJob( 23 SocketStreamJob* SocketStreamJob::CreateSocketStreamJob(
24 const GURL& url, 24 const GURL& url,
25 SocketStream::Delegate* delegate, 25 SocketStream::Delegate* delegate,
26 TransportSecurityState* sts, 26 TransportSecurityState* sts,
27 SSLConfigService* ssl, 27 SSLConfigService* ssl,
28 URLRequestContext* context, 28 URLRequestContext* context,
29 CookieStore* cookie_store) { 29 CookieStore* cookie_store) {
30 GURL socket_url(url); 30 GURL socket_url(url);
31 if (url.scheme() == "ws" && sts && 31 if (url.scheme() == "ws" && sts &&
32 sts->ShouldUpgradeToSSL(url.host(), 32 sts->ShouldUpgradeToSSL(url.host())) {
33 SSLConfigService::IsSNIAvailable(ssl))) {
34 url::Replacements<char> replacements; 33 url::Replacements<char> replacements;
35 static const char kNewScheme[] = "wss"; 34 static const char kNewScheme[] = "wss";
36 replacements.SetScheme(kNewScheme, url::Component(0, strlen(kNewScheme))); 35 replacements.SetScheme(kNewScheme, url::Component(0, strlen(kNewScheme)));
37 socket_url = url.ReplaceComponents(replacements); 36 socket_url = url.ReplaceComponents(replacements);
38 } 37 }
39 return SocketStreamJobManager::GetInstance()->CreateJob( 38 return SocketStreamJobManager::GetInstance()->CreateJob(
40 socket_url, delegate, context, cookie_store); 39 socket_url, delegate, context, cookie_store);
41 } 40 }
42 41
43 SocketStreamJob::SocketStreamJob() {} 42 SocketStreamJob::SocketStreamJob() {}
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 } 83 }
85 84
86 void SocketStreamJob::DetachContext() { 85 void SocketStreamJob::DetachContext() {
87 if (socket_.get()) 86 if (socket_.get())
88 socket_->DetachContext(); 87 socket_->DetachContext();
89 } 88 }
90 89
91 SocketStreamJob::~SocketStreamJob() {} 90 SocketStreamJob::~SocketStreamJob() {}
92 91
93 } // namespace net 92 } // namespace net
OLDNEW
« no previous file with comments | « net/socket_stream/socket_stream.cc ('k') | net/spdy/spdy_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698