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

Unified Diff: chrome/browser/devtools/devtools_network_transaction.cc

Issue 1461403003: [DevTools] Call directly into underlying http transaction when throttling is disabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: wrong order Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/devtools/devtools_network_transaction.cc
diff --git a/chrome/browser/devtools/devtools_network_transaction.cc b/chrome/browser/devtools/devtools_network_transaction.cc
index c54d87e58d6ba4480b03b5da314b64fba012f293..5f815aa9d6a3124b8cbeeffa773761b82bbee29e 100644
--- a/chrome/browser/devtools/devtools_network_transaction.cc
+++ b/chrome/browser/devtools/devtools_network_transaction.cc
@@ -150,8 +150,10 @@ int DevToolsNetworkTransaction::Start(
return net::ERR_INTERNET_DISCONNECTED;
}
- if (interceptor_)
- interceptor_->AddThrottable(this);
+ if (!interceptor_)
+ return network_transaction_->Start(request_, callback, net_log);
+
+ interceptor_->AddThrottable(this);
int rv = network_transaction_->Start(request_, proxy_callback_, net_log);
return SetupCallback(callback, rv, START);
}
@@ -175,6 +177,8 @@ int DevToolsNetworkTransaction::RestartIgnoringLastError(
const net::CompletionCallback& callback) {
if (failed_)
return net::ERR_INTERNET_DISCONNECTED;
+ if (!interceptor_)
+ return network_transaction_->RestartIgnoringLastError(callback);
int rv = network_transaction_->RestartIgnoringLastError(proxy_callback_);
return SetupCallback(callback, rv, RESTART_IGNORING_LAST_ERROR);
}
@@ -185,6 +189,10 @@ int DevToolsNetworkTransaction::RestartWithCertificate(
const net::CompletionCallback& callback) {
if (failed_)
return net::ERR_INTERNET_DISCONNECTED;
+ if (!interceptor_) {
+ return network_transaction_->RestartWithCertificate(
+ client_cert, client_private_key, callback);
+ }
int rv = network_transaction_->RestartWithCertificate(
client_cert, client_private_key, proxy_callback_);
return SetupCallback(callback, rv, RESTART_WITH_CERTIFICATE);
@@ -195,6 +203,8 @@ int DevToolsNetworkTransaction::RestartWithAuth(
const net::CompletionCallback& callback) {
if (failed_)
return net::ERR_INTERNET_DISCONNECTED;
+ if (!interceptor_)
+ return network_transaction_->RestartWithAuth(credentials, callback);
int rv = network_transaction_->RestartWithAuth(credentials, proxy_callback_);
return SetupCallback(callback, rv, RESTART_WITH_AUTH);
}
@@ -209,6 +219,8 @@ int DevToolsNetworkTransaction::Read(
const net::CompletionCallback& callback) {
if (failed_)
return net::ERR_INTERNET_DISCONNECTED;
+ if (!interceptor_)
+ return network_transaction_->Read(buf, buf_len, callback);
int rv = network_transaction_->Read(buf, buf_len, proxy_callback_);
return SetupCallback(callback, rv, READ);
}
@@ -284,6 +296,8 @@ void DevToolsNetworkTransaction::SetBeforeProxyHeadersSentCallback(
int DevToolsNetworkTransaction::ResumeNetworkStart() {
if (failed_)
return net::ERR_INTERNET_DISCONNECTED;
+ if (!interceptor_)
+ return network_transaction_->ResumeNetworkStart();
return network_transaction_->ResumeNetworkStart();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698