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

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: 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..fcefc87f195a6475152c8431d01681f3481e4d22 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() {
+ URLRequestJob::Kill();
+ weak_factory_.InvalidateWeakPtrs();
davidben 2015/10/08 16:16:36 Nit: Completely doesn't matter here, but I've seen
mmenke 2015/10/08 16:20:42 Makes sense. That also the reverse of constructio
+}
+
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