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

Side by Side Diff: net/http/http_network_layer.cc

Issue 377063002: Revert of Add a probability to Alternate-Protocol support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | net/http/http_network_session.h » ('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/http/http_network_layer.h" 5 #include "net/http/http_network_layer.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/power_monitor/power_monitor.h" 8 #include "base/power_monitor/power_monitor.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/string_split.h" 10 #include "base/strings/string_split.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 // static 44 // static
45 HttpTransactionFactory* HttpNetworkLayer::CreateFactory( 45 HttpTransactionFactory* HttpNetworkLayer::CreateFactory(
46 HttpNetworkSession* session) { 46 HttpNetworkSession* session) {
47 DCHECK(session); 47 DCHECK(session);
48 48
49 return new HttpNetworkLayer(session); 49 return new HttpNetworkLayer(session);
50 } 50 }
51 51
52 // static 52 // static
53 void HttpNetworkLayer::ForceAlternateProtocol() { 53 void HttpNetworkLayer::ForceAlternateProtocol() {
54 AlternateProtocolInfo pair(443, NPN_SPDY_3, 1); 54 PortAlternateProtocolPair pair;
55 pair.port = 443;
56 pair.protocol = NPN_SPDY_3;
55 HttpServerPropertiesImpl::ForceAlternateProtocol(pair); 57 HttpServerPropertiesImpl::ForceAlternateProtocol(pair);
56 } 58 }
57 59
58 //----------------------------------------------------------------------------- 60 //-----------------------------------------------------------------------------
59 61
60 int HttpNetworkLayer::CreateTransaction(RequestPriority priority, 62 int HttpNetworkLayer::CreateTransaction(RequestPriority priority,
61 scoped_ptr<HttpTransaction>* trans) { 63 scoped_ptr<HttpTransaction>* trans) {
62 if (suspended_) 64 if (suspended_)
63 return ERR_NETWORK_IO_SUSPENDED; 65 return ERR_NETWORK_IO_SUSPENDED;
64 66
(...skipping 12 matching lines...) Expand all
77 79
78 if (session_.get()) 80 if (session_.get())
79 session_->CloseIdleConnections(); 81 session_->CloseIdleConnections();
80 } 82 }
81 83
82 void HttpNetworkLayer::OnResume() { 84 void HttpNetworkLayer::OnResume() {
83 suspended_ = false; 85 suspended_ = false;
84 } 86 }
85 87
86 } // namespace net 88 } // namespace net
OLDNEW
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | net/http/http_network_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698