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

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

Issue 375513002: [ServiceWorker] Propagates ServiceWorker fetched response's URL and wasFetchedViaServiceWorker flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add const 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 unified diff | Download patch
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 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTROLLEE_REQUEST_HANDLER _H_ 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTROLLEE_REQUEST_HANDLER _H_
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTROLLEE_REQUEST_HANDLER _H_ 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTROLLEE_REQUEST_HANDLER _H_
7 7
8 #include "content/browser/service_worker/service_worker_request_handler.h" 8 #include "content/browser/service_worker/service_worker_request_handler.h"
9 9
10 namespace net { 10 namespace net {
(...skipping 16 matching lines...) Expand all
27 base::WeakPtr<ServiceWorkerProviderHost> provider_host, 27 base::WeakPtr<ServiceWorkerProviderHost> provider_host,
28 base::WeakPtr<webkit_blob::BlobStorageContext> blob_storage_context, 28 base::WeakPtr<webkit_blob::BlobStorageContext> blob_storage_context,
29 ResourceType::Type resource_type); 29 ResourceType::Type resource_type);
30 virtual ~ServiceWorkerControlleeRequestHandler(); 30 virtual ~ServiceWorkerControlleeRequestHandler();
31 31
32 // Called via custom URLRequestJobFactory. 32 // Called via custom URLRequestJobFactory.
33 virtual net::URLRequestJob* MaybeCreateJob( 33 virtual net::URLRequestJob* MaybeCreateJob(
34 net::URLRequest* request, 34 net::URLRequest* request,
35 net::NetworkDelegate* network_delegate) OVERRIDE; 35 net::NetworkDelegate* network_delegate) OVERRIDE;
36 36
37 virtual void GetExtraResponseInfo(
38 bool* was_fetched_via_service_worker,
39 GURL* original_url_via_service_worker) const OVERRIDE;
40
37 private: 41 private:
38 typedef ServiceWorkerControlleeRequestHandler self; 42 typedef ServiceWorkerControlleeRequestHandler self;
39 43
40 // For main resource case. 44 // For main resource case.
41 void PrepareForMainResource(const GURL& url); 45 void PrepareForMainResource(const GURL& url);
42 void DidLookupRegistrationForMainResource( 46 void DidLookupRegistrationForMainResource(
43 ServiceWorkerStatusCode status, 47 ServiceWorkerStatusCode status,
44 const scoped_refptr<ServiceWorkerRegistration>& registration); 48 const scoped_refptr<ServiceWorkerRegistration>& registration);
45 49
46 // For sub resource case. 50 // For sub resource case.
47 void PrepareForSubResource(); 51 void PrepareForSubResource();
48 52
49 bool is_main_resource_load_; 53 bool is_main_resource_load_;
50 scoped_refptr<ServiceWorkerURLRequestJob> job_; 54 scoped_refptr<ServiceWorkerURLRequestJob> job_;
51 base::WeakPtrFactory<ServiceWorkerControlleeRequestHandler> weak_factory_; 55 base::WeakPtrFactory<ServiceWorkerControlleeRequestHandler> weak_factory_;
52 56
53 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerControlleeRequestHandler); 57 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerControlleeRequestHandler);
54 }; 58 };
55 59
56 } // namespace content 60 } // namespace content
57 61
58 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTROLLEE_REQUEST_HAND LER_H_ 62 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTROLLEE_REQUEST_HAND LER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698