| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/callback_helpers.h" | 9 #include "base/callback_helpers.h" |
| 10 #include "chrome/browser/devtools/devtools_network_controller.h" | 10 #include "chrome/browser/devtools/devtools_network_controller.h" |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 if (!interceptor_) | 161 if (!interceptor_) |
| 162 return network_transaction_->RestartIgnoringLastError(callback); | 162 return network_transaction_->RestartIgnoringLastError(callback); |
| 163 | 163 |
| 164 int result = network_transaction_->RestartIgnoringLastError( | 164 int result = network_transaction_->RestartIgnoringLastError( |
| 165 base::Bind(&DevToolsNetworkTransaction::IOCallback, | 165 base::Bind(&DevToolsNetworkTransaction::IOCallback, |
| 166 base::Unretained(this), callback, true)); | 166 base::Unretained(this), callback, true)); |
| 167 return Throttle(callback, true, result); | 167 return Throttle(callback, true, result); |
| 168 } | 168 } |
| 169 | 169 |
| 170 int DevToolsNetworkTransaction::RestartWithCertificate( | 170 int DevToolsNetworkTransaction::RestartWithCertificate( |
| 171 net::X509Certificate* client_cert, | 171 scoped_refptr<net::X509Certificate> client_cert, |
| 172 net::SSLPrivateKey* client_private_key, | 172 scoped_refptr<net::SSLPrivateKey> client_private_key, |
| 173 const net::CompletionCallback& callback) { | 173 const net::CompletionCallback& callback) { |
| 174 if (CheckFailed()) | 174 if (CheckFailed()) |
| 175 return net::ERR_INTERNET_DISCONNECTED; | 175 return net::ERR_INTERNET_DISCONNECTED; |
| 176 if (!interceptor_) { | 176 if (!interceptor_) { |
| 177 return network_transaction_->RestartWithCertificate( | 177 return network_transaction_->RestartWithCertificate( |
| 178 client_cert, client_private_key, callback); | 178 std::move(client_cert), std::move(client_private_key), callback); |
| 179 } | 179 } |
| 180 | 180 |
| 181 int result = network_transaction_->RestartWithCertificate( | 181 int result = network_transaction_->RestartWithCertificate( |
| 182 client_cert, client_private_key, | 182 std::move(client_cert), std::move(client_private_key), |
| 183 base::Bind(&DevToolsNetworkTransaction::IOCallback, | 183 base::Bind(&DevToolsNetworkTransaction::IOCallback, |
| 184 base::Unretained(this), callback, true)); | 184 base::Unretained(this), callback, true)); |
| 185 return Throttle(callback, true, result); | 185 return Throttle(callback, true, result); |
| 186 } | 186 } |
| 187 | 187 |
| 188 int DevToolsNetworkTransaction::RestartWithAuth( | 188 int DevToolsNetworkTransaction::RestartWithAuth( |
| 189 const net::AuthCredentials& credentials, | 189 const net::AuthCredentials& credentials, |
| 190 const net::CompletionCallback& callback) { | 190 const net::CompletionCallback& callback) { |
| 191 if (CheckFailed()) | 191 if (CheckFailed()) |
| 192 return net::ERR_INTERNET_DISCONNECTED; | 192 return net::ERR_INTERNET_DISCONNECTED; |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 if (CheckFailed()) | 294 if (CheckFailed()) |
| 295 return net::ERR_INTERNET_DISCONNECTED; | 295 return net::ERR_INTERNET_DISCONNECTED; |
| 296 return network_transaction_->ResumeNetworkStart(); | 296 return network_transaction_->ResumeNetworkStart(); |
| 297 } | 297 } |
| 298 | 298 |
| 299 void | 299 void |
| 300 DevToolsNetworkTransaction::GetConnectionAttempts(net::ConnectionAttempts* out) | 300 DevToolsNetworkTransaction::GetConnectionAttempts(net::ConnectionAttempts* out) |
| 301 const { | 301 const { |
| 302 network_transaction_->GetConnectionAttempts(out); | 302 network_transaction_->GetConnectionAttempts(out); |
| 303 } | 303 } |
| OLD | NEW |