| OLD | NEW |
| 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/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
| 9 #include "base/strings/string_split.h" | 9 #include "base/strings/string_split.h" |
| 10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 HttpNetworkSession* session) { | 35 HttpNetworkSession* session) { |
| 36 DCHECK(session); | 36 DCHECK(session); |
| 37 | 37 |
| 38 return new HttpNetworkLayer(session); | 38 return new HttpNetworkLayer(session); |
| 39 } | 39 } |
| 40 | 40 |
| 41 // static | 41 // static |
| 42 void HttpNetworkLayer::ForceAlternateProtocol() { | 42 void HttpNetworkLayer::ForceAlternateProtocol() { |
| 43 PortAlternateProtocolPair pair; | 43 PortAlternateProtocolPair pair; |
| 44 pair.port = 443; | 44 pair.port = 443; |
| 45 pair.protocol = NPN_SPDY_2; | 45 pair.protocol = NPN_SPDY_3; |
| 46 HttpServerPropertiesImpl::ForceAlternateProtocol(pair); | 46 HttpServerPropertiesImpl::ForceAlternateProtocol(pair); |
| 47 } | 47 } |
| 48 | 48 |
| 49 //----------------------------------------------------------------------------- | 49 //----------------------------------------------------------------------------- |
| 50 | 50 |
| 51 int HttpNetworkLayer::CreateTransaction(RequestPriority priority, | 51 int HttpNetworkLayer::CreateTransaction(RequestPriority priority, |
| 52 scoped_ptr<HttpTransaction>* trans, | 52 scoped_ptr<HttpTransaction>* trans, |
| 53 HttpTransactionDelegate* delegate) { | 53 HttpTransactionDelegate* delegate) { |
| 54 if (suspended_) | 54 if (suspended_) |
| 55 return ERR_NETWORK_IO_SUSPENDED; | 55 return ERR_NETWORK_IO_SUSPENDED; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 69 | 69 |
| 70 if (session_.get()) | 70 if (session_.get()) |
| 71 session_->CloseIdleConnections(); | 71 session_->CloseIdleConnections(); |
| 72 } | 72 } |
| 73 | 73 |
| 74 void HttpNetworkLayer::OnResume() { | 74 void HttpNetworkLayer::OnResume() { |
| 75 suspended_ = false; | 75 suspended_ = false; |
| 76 } | 76 } |
| 77 | 77 |
| 78 } // namespace net | 78 } // namespace net |
| OLD | NEW |