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

Unified Diff: content/common/throttling_url_loader.cc

Issue 2982363002: Add support for fallback content for the frame. This includes main and subframes. (Closed)
Patch Set: More cleanup Created 3 years, 5 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
Index: content/common/throttling_url_loader.cc
diff --git a/content/common/throttling_url_loader.cc b/content/common/throttling_url_loader.cc
index 8843606cad75c5e12fe50d0fb1bfc8641d7046ed..486a8c9e7db7af5291a4c09717af622867d893d5 100644
--- a/content/common/throttling_url_loader.cc
+++ b/content/common/throttling_url_loader.cc
@@ -103,6 +103,11 @@ void ThrottlingURLLoader::SetPriority(net::RequestPriority priority,
url_loader_->SetPriority(priority, intra_priority_value);
}
+void ThrottlingURLLoader::DisconnectClient() {
+ client_binding_.Close();
+ url_loader_ = nullptr;
+}
+
ThrottlingURLLoader::ThrottlingURLLoader(
std::vector<std::unique_ptr<URLLoaderThrottle>> throttles,
mojom::URLLoaderClient* client,
@@ -295,9 +300,7 @@ void ThrottlingURLLoader::CancelWithError(int error_code) {
request_complete_data.completion_time = base::TimeTicks::Now();
deferred_stage_ = DEFERRED_NONE;
- client_binding_.Close();
- url_loader_ = nullptr;
-
+ DisconnectClient();
forwarding_client_->OnComplete(request_complete_data);
}
« content/common/throttling_url_loader.h ('K') | « content/common/throttling_url_loader.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698