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

Unified Diff: content/browser/service_worker/service_worker_url_request_job.cc

Issue 2480563002: Remove URLRequest::OrphanJob(). (Closed)
Patch Set: Response to comments Created 4 years, 1 month 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/browser/service_worker/service_worker_write_to_cache_job.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/service_worker/service_worker_url_request_job.cc
diff --git a/content/browser/service_worker/service_worker_url_request_job.cc b/content/browser/service_worker/service_worker_url_request_job.cc
index 3aec57db6b4fb94e91cd93fe4a4cff9fe65ac6f0..a6d5a73168aaaf0514dc9d16d31704010b360c58 100644
--- a/content/browser/service_worker/service_worker_url_request_job.cc
+++ b/content/browser/service_worker/service_worker_url_request_job.cc
@@ -368,9 +368,7 @@ void ServiceWorkerURLRequestJob::RecordResult(
}
did_record_result_ = true;
ServiceWorkerMetrics::RecordURLRequestJobResult(IsMainResourceLoad(), result);
- if (request()) {
- request()->net_log().AddEvent(RequestJobResultToNetEventType(result));
- }
+ request()->net_log().AddEvent(RequestJobResultToNetEventType(result));
}
base::WeakPtr<ServiceWorkerURLRequestJob>
@@ -586,12 +584,6 @@ void ServiceWorkerURLRequestJob::DidDispatchFetchEvent(
fetch_dispatcher_.reset();
ServiceWorkerMetrics::RecordFetchEventStatus(IsMainResourceLoad(), status);
- // Check if we're not orphaned.
- if (!request()) {
- RecordResult(ServiceWorkerMetrics::REQUEST_JOB_ERROR_NO_REQUEST);
- return;
- }
-
ServiceWorkerMetrics::URLRequestJobResult result =
ServiceWorkerMetrics::REQUEST_JOB_ERROR_BAD_DELEGATE;
if (!delegate_->RequestStillValid(&result)) {
« no previous file with comments | « no previous file | content/browser/service_worker/service_worker_write_to_cache_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698