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

Unified Diff: components/about_handler/url_request_about_job.cc

Issue 1395643003: Fix two URLRequestJob subclasses that didn't support cancellation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add OWNERS Created 5 years, 2 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 | « components/about_handler/url_request_about_job.h ('k') | net/url_request/url_request_error_job.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/about_handler/url_request_about_job.cc
diff --git a/components/about_handler/url_request_about_job.cc b/components/about_handler/url_request_about_job.cc
index 880685a1b8d3654deaeab8070a91da22948033ab..71e7c1eafc57c7f9448e6c3d43e6ac0014f08de4 100644
--- a/components/about_handler/url_request_about_job.cc
+++ b/components/about_handler/url_request_about_job.cc
@@ -30,6 +30,11 @@ void URLRequestAboutJob::Start() {
base::Bind(&URLRequestAboutJob::StartAsync, weak_factory_.GetWeakPtr()));
}
+void URLRequestAboutJob::Kill() {
+ weak_factory_.InvalidateWeakPtrs();
+ URLRequestJob::Kill();
+}
+
bool URLRequestAboutJob::GetMimeType(std::string* mime_type) const {
*mime_type = "text/html";
return true;
« no previous file with comments | « components/about_handler/url_request_about_job.h ('k') | net/url_request/url_request_error_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698