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

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

Issue 362183002: ServiceWorker: Set provider host document URL for no-cache load. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review update Created 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/service_worker/service_worker_controllee_request_handler.cc
diff --git a/content/browser/service_worker/service_worker_controllee_request_handler.cc b/content/browser/service_worker/service_worker_controllee_request_handler.cc
index fdaa81dc171a21d5994968c4e186dc801e295785..5f9e7c906c3bb08b806d18c635ccd66250c73fe3 100644
--- a/content/browser/service_worker/service_worker_controllee_request_handler.cc
+++ b/content/browser/service_worker/service_worker_controllee_request_handler.cc
@@ -46,13 +46,21 @@ ServiceWorkerControlleeRequestHandler::
net::URLRequestJob* ServiceWorkerControlleeRequestHandler::MaybeCreateJob(
net::URLRequest* request,
net::NetworkDelegate* network_delegate) {
- if (!context_ || !provider_host_ ||
- request->load_flags() & net::LOAD_BYPASS_CACHE) {
+ if (!context_ || !provider_host_) {
// We can't do anything other than to fall back to network.
job_ = NULL;
return NULL;
}
+ if (request->load_flags() & net::LOAD_BYPASS_CACHE) {
+ if (is_main_resource_load_ && provider_host_) {
michaeln 2014/07/11 19:48:53 dont think we can get here if !provider_host_ so t
+ provider_host_->SetDocumentUrl(
+ net::SimplifyUrlForRequest(request->url()));
+ }
+ job_ = NULL;
+ return NULL;
+ }
+
// This may get called multiple times for original and redirect requests:
// A. original request case: job_ is null, no previous location info.
// B. redirect or restarted request case:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698