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

Side by Side Diff: content/browser/service_worker/service_worker_controllee_request_handler.cc

Issue 527713002: [ServiceWorker] Introduce skip_service_worker flag and remove LOAD_BYPASS_CACHE check. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | content/child/web_url_loader_impl.cc » ('j') | net/base/load_flags_list.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/service_worker/service_worker_controllee_request_handl er.h" 5 #include "content/browser/service_worker/service_worker_controllee_request_handl er.h"
6 6
7 #include "content/browser/service_worker/service_worker_context_core.h" 7 #include "content/browser/service_worker/service_worker_context_core.h"
8 #include "content/browser/service_worker/service_worker_metrics.h" 8 #include "content/browser/service_worker/service_worker_metrics.h"
9 #include "content/browser/service_worker/service_worker_provider_host.h" 9 #include "content/browser/service_worker/service_worker_provider_host.h"
10 #include "content/browser/service_worker/service_worker_registration.h" 10 #include "content/browser/service_worker/service_worker_registration.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 net::URLRequestJob* ServiceWorkerControlleeRequestHandler::MaybeCreateJob( 49 net::URLRequestJob* ServiceWorkerControlleeRequestHandler::MaybeCreateJob(
50 net::URLRequest* request, 50 net::URLRequest* request,
51 net::NetworkDelegate* network_delegate) { 51 net::NetworkDelegate* network_delegate) {
52 if (!context_ || !provider_host_) { 52 if (!context_ || !provider_host_) {
53 // We can't do anything other than to fall back to network. 53 // We can't do anything other than to fall back to network.
54 job_ = NULL; 54 job_ = NULL;
55 return NULL; 55 return NULL;
56 } 56 }
57 57
58 if (request->load_flags() & net::LOAD_BYPASS_CACHE) { 58 if (request->load_flags() & net::LOAD_SKIP_SERVICE_WORKER) {
59 if (is_main_resource_load_) { 59 if (is_main_resource_load_) {
60 provider_host_->SetDocumentUrl( 60 provider_host_->SetDocumentUrl(
61 net::SimplifyUrlForRequest(request->url())); 61 net::SimplifyUrlForRequest(request->url()));
62 } 62 }
63 job_ = NULL; 63 job_ = NULL;
64 return NULL; 64 return NULL;
65 } 65 }
66 66
67 // This may get called multiple times for original and redirect requests: 67 // This may get called multiple times for original and redirect requests:
68 // A. original request case: job_ is null, no previous location info. 68 // A. original request case: job_ is null, no previous location info.
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 } 185 }
186 186
187 void ServiceWorkerControlleeRequestHandler::PrepareForSubResource() { 187 void ServiceWorkerControlleeRequestHandler::PrepareForSubResource() {
188 DCHECK(job_.get()); 188 DCHECK(job_.get());
189 DCHECK(context_); 189 DCHECK(context_);
190 DCHECK(provider_host_->active_version()); 190 DCHECK(provider_host_->active_version());
191 job_->ForwardToServiceWorker(); 191 job_->ForwardToServiceWorker();
192 } 192 }
193 193
194 } // namespace content 194 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/child/web_url_loader_impl.cc » ('j') | net/base/load_flags_list.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698