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

Unified Diff: net/http/http_transaction_test_util.cc

Issue 2847653002: Revert of HttpCache::Transaction layer allowing parallel validation (Closed)
Patch Set: Created 3 years, 8 months 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 | « net/http/http_transaction_test_util.h ('k') | net/http/mock_http_cache.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_transaction_test_util.cc
diff --git a/net/http/http_transaction_test_util.cc b/net/http/http_transaction_test_util.cc
index fa42dd78f5a0c19cce3d4a0c0329ce8f08742cb5..a5b57461df5a2e49568fa045bc285f9d01e006bc 100644
--- a/net/http/http_transaction_test_util.cc
+++ b/net/http/http_transaction_test_util.cc
@@ -409,6 +409,13 @@
if (!t)
return ERR_FAILED;
+ if (!before_network_start_callback_.is_null()) {
+ bool defer = false;
+ before_network_start_callback_.Run(&defer);
+ if (defer)
+ return net::ERR_IO_PENDING;
+ }
+
test_mode_ = t->test_mode;
// Return immediately if we're returning an error.
@@ -459,16 +466,6 @@
if (request_->load_flags & LOAD_PREFETCH)
response_.unused_since_prefetch = true;
- // Pause and resume.
- if (!before_network_start_callback_.is_null()) {
- bool defer = false;
- before_network_start_callback_.Run(&defer);
- if (defer) {
- callback_ = callback;
- return net::ERR_IO_PENDING;
- }
- }
-
if (test_mode_ & TEST_MODE_SYNC_NET_START)
return OK;
@@ -485,9 +482,8 @@
const BeforeHeadersSentCallback& callback) {}
int MockNetworkTransaction::ResumeNetworkStart() {
- DCHECK(!callback_.is_null());
- CallbackLater(callback_, OK);
- return ERR_IO_PENDING;
+ // Should not get here.
+ return ERR_FAILED;
}
void MockNetworkTransaction::GetConnectionAttempts(
« no previous file with comments | « net/http/http_transaction_test_util.h ('k') | net/http/mock_http_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698