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/string_number_conversions.h" | 8 #include "base/string_number_conversions.h" |
9 #include "base/string_split.h" | 9 #include "base/string_split.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 | 109 |
110 trans->reset(new HttpNetworkTransaction(GetSession())); | 110 trans->reset(new HttpNetworkTransaction(GetSession())); |
111 return OK; | 111 return OK; |
112 } | 112 } |
113 | 113 |
114 HttpCache* HttpNetworkLayer::GetCache() { | 114 HttpCache* HttpNetworkLayer::GetCache() { |
115 return NULL; | 115 return NULL; |
116 } | 116 } |
117 | 117 |
118 HttpNetworkSession* HttpNetworkLayer::GetSession() { | 118 HttpNetworkSession* HttpNetworkLayer::GetSession() { |
119 return session_; | 119 return session_.get(); |
120 } | 120 } |
121 | 121 |
122 void HttpNetworkLayer::OnSuspend() { | 122 void HttpNetworkLayer::OnSuspend() { |
123 suspended_ = true; | 123 suspended_ = true; |
124 | 124 |
125 if (session_) | 125 if (session_.get()) |
126 session_->CloseIdleConnections(); | 126 session_->CloseIdleConnections(); |
127 } | 127 } |
128 | 128 |
129 void HttpNetworkLayer::OnResume() { | 129 void HttpNetworkLayer::OnResume() { |
130 suspended_ = false; | 130 suspended_ = false; |
131 } | 131 } |
132 | 132 |
133 } // namespace net | 133 } // namespace net |
OLD | NEW |