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

Unified Diff: content/child/web_url_loader_impl.cc

Issue 766963003: Revert of Properly handle defers loading in WebURLLoaderImpl for data uris (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 | content/child/web_url_loader_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/web_url_loader_impl.cc
diff --git a/content/child/web_url_loader_impl.cc b/content/child/web_url_loader_impl.cc
index 752620600900e55914bc21ed8095192827abe9bc..bd6fe10b6bc29e409ab96515e44c96ec55e60d40 100644
--- a/content/child/web_url_loader_impl.cc
+++ b/content/child/web_url_loader_impl.cc
@@ -8,7 +8,6 @@
#include <algorithm>
#include <deque>
-#include <string>
#include "base/bind.h"
#include "base/command_line.h"
@@ -355,8 +354,6 @@
// mechanism.
std::deque<char> body_stream_buffer_;
bool got_all_stream_body_data_;
- enum DeferState {NOT_DEFERRING, SHOULD_DEFER, DEFERRED_DATA};
- DeferState defers_loading_;
};
WebURLLoaderImpl::Context::Context(
@@ -368,8 +365,7 @@
resource_dispatcher_(resource_dispatcher),
task_runner_(task_runner),
referrer_policy_(blink::WebReferrerPolicyDefault),
- got_all_stream_body_data_(false),
- defers_loading_(NOT_DEFERRING) {
+ got_all_stream_body_data_(false) {
}
void WebURLLoaderImpl::Context::Cancel() {
@@ -394,17 +390,6 @@
void WebURLLoaderImpl::Context::SetDefersLoading(bool value) {
if (bridge_)
bridge_->SetDefersLoading(value);
- if (value) {
- DCHECK_EQ(NOT_DEFERRING, defers_loading_);
- defers_loading_ = SHOULD_DEFER;
- } else {
- DCHECK_NE(NOT_DEFERRING, defers_loading_);
- if (defers_loading_ == DEFERRED_DATA) {
- task_runner_->PostTask(FROM_HERE,
- base::Bind(&Context::HandleDataURL, this));
- }
- defers_loading_ = NOT_DEFERRING;
- }
}
void WebURLLoaderImpl::Context::DidChangePriority(
@@ -851,12 +836,6 @@
}
void WebURLLoaderImpl::Context::HandleDataURL() {
- DCHECK_NE(defers_loading_, DEFERRED_DATA);
- if (defers_loading_ == SHOULD_DEFER) {
- defers_loading_ = DEFERRED_DATA;
- return;
- }
-
ResourceResponseInfo info;
std::string data;
« no previous file with comments | « no previous file | content/child/web_url_loader_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698