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

Unified Diff: net/url_request/url_request_job.h

Issue 2542843006: ResourceLoader: Fix a bunch of double-cancellation/double-error notification cases. (Closed)
Patch Set: Fix merge Created 4 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 | « net/url_request/url_request.cc ('k') | net/url_request/url_request_job.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_job.h
diff --git a/net/url_request/url_request_job.h b/net/url_request/url_request_job.h
index 610ce3323e6ea3bf2bc905194d78fe974275a572..2341999ae5493b1e205343963b41d8cbc68549de 100644
--- a/net/url_request/url_request_job.h
+++ b/net/url_request/url_request_job.h
@@ -360,15 +360,19 @@ class NET_EXPORT URLRequestJob : public base::PowerObserver {
// |bytes_read| unfiltered bytes have been read for this job.
void RecordBytesRead(int bytes_read);
- // NotifyDone marks that request is done. It is really a glorified
+ // OnDone marks that request is done. It is really a glorified
// set_status, but also does internal state checking and job tracking. It
// should be called once per request, when the job is finished doing all IO.
- void NotifyDone(const URLRequestStatus& status);
-
- // Some work performed by NotifyDone must be completed asynchronously so
- // as to avoid re-entering URLRequest::Delegate. This method performs that
- // work.
- void CompleteNotifyDone();
+ //
+ // If |notify_done| is true, will notify the URLRequest if there was an error
+ // asynchronously. Otherwise, the caller will need to do this itself,
+ // possibly through a synchronous return value.
+ // TODO(mmenke): Remove |notify_done|, and make caller handle notification.
+ void OnDone(const URLRequestStatus& status, bool notify_done);
+
+ // Takes care of the notification initiated by OnDone() to avoid re-entering
+ // the URLRequest::Delegate.
+ void NotifyDone();
// Subclasses may implement this method to record packet arrival times.
// The default implementation does nothing. Only invoked when bytes have been
« no previous file with comments | « net/url_request/url_request.cc ('k') | net/url_request/url_request_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698