OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chrome/browser/devtools/devtools_network_transaction.h" | 5 #include "chrome/browser/devtools/devtools_network_transaction.h" |
6 | 6 |
7 #include "chrome/browser/devtools/devtools_network_controller.h" | 7 #include "chrome/browser/devtools/devtools_network_controller.h" |
8 #include "chrome/browser/devtools/devtools_network_interceptor.h" | 8 #include "chrome/browser/devtools/devtools_network_interceptor.h" |
9 #include "net/base/load_timing_info.h" | 9 #include "net/base/load_timing_info.h" |
10 #include "net/base/net_errors.h" | 10 #include "net/base/net_errors.h" |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 int DevToolsNetworkTransaction::RestartIgnoringLastError( | 172 int DevToolsNetworkTransaction::RestartIgnoringLastError( |
173 const net::CompletionCallback& callback) { | 173 const net::CompletionCallback& callback) { |
174 if (failed_) | 174 if (failed_) |
175 return net::ERR_INTERNET_DISCONNECTED; | 175 return net::ERR_INTERNET_DISCONNECTED; |
176 int rv = network_transaction_->RestartIgnoringLastError(proxy_callback_); | 176 int rv = network_transaction_->RestartIgnoringLastError(proxy_callback_); |
177 return SetupCallback(callback, rv, RESTART_IGNORING_LAST_ERROR); | 177 return SetupCallback(callback, rv, RESTART_IGNORING_LAST_ERROR); |
178 } | 178 } |
179 | 179 |
180 int DevToolsNetworkTransaction::RestartWithCertificate( | 180 int DevToolsNetworkTransaction::RestartWithCertificate( |
181 net::X509Certificate* client_cert, | 181 net::X509Certificate* client_cert, |
| 182 net::SSLPrivateKey* client_private_key, |
182 const net::CompletionCallback& callback) { | 183 const net::CompletionCallback& callback) { |
183 if (failed_) | 184 if (failed_) |
184 return net::ERR_INTERNET_DISCONNECTED; | 185 return net::ERR_INTERNET_DISCONNECTED; |
185 int rv = network_transaction_->RestartWithCertificate( | 186 int rv = network_transaction_->RestartWithCertificate( |
186 client_cert, proxy_callback_); | 187 client_cert, client_private_key, proxy_callback_); |
187 return SetupCallback(callback, rv, RESTART_WITH_CERTIFICATE); | 188 return SetupCallback(callback, rv, RESTART_WITH_CERTIFICATE); |
188 } | 189 } |
189 | 190 |
190 int DevToolsNetworkTransaction::RestartWithAuth( | 191 int DevToolsNetworkTransaction::RestartWithAuth( |
191 const net::AuthCredentials& credentials, | 192 const net::AuthCredentials& credentials, |
192 const net::CompletionCallback& callback) { | 193 const net::CompletionCallback& callback) { |
193 if (failed_) | 194 if (failed_) |
194 return net::ERR_INTERNET_DISCONNECTED; | 195 return net::ERR_INTERNET_DISCONNECTED; |
195 int rv = network_transaction_->RestartWithAuth(credentials, proxy_callback_); | 196 int rv = network_transaction_->RestartWithAuth(credentials, proxy_callback_); |
196 return SetupCallback(callback, rv, RESTART_WITH_AUTH); | 197 return SetupCallback(callback, rv, RESTART_WITH_AUTH); |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 } | 292 } |
292 | 293 |
293 void DevToolsNetworkTransaction::ThrottleFinished() { | 294 void DevToolsNetworkTransaction::ThrottleFinished() { |
294 DCHECK(!callback_.is_null()); | 295 DCHECK(!callback_.is_null()); |
295 DCHECK(callback_type_ == READ || callback_type_ == START); | 296 DCHECK(callback_type_ == READ || callback_type_ == START); |
296 net::CompletionCallback callback = callback_; | 297 net::CompletionCallback callback = callback_; |
297 callback_.Reset(); | 298 callback_.Reset(); |
298 callback_type_ = NONE; | 299 callback_type_ = NONE; |
299 callback.Run(throttled_result_); | 300 callback.Run(throttled_result_); |
300 } | 301 } |
OLD | NEW |