OLD | NEW |
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_CONTEXT_REQUEST_HANDLER_H_ | 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_REQUEST_HANDLER_H_ |
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_REQUEST_HANDLER_H_ | 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_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 content { | 10 namespace content { |
(...skipping 10 matching lines...) Expand all Loading... |
21 base::WeakPtr<ServiceWorkerProviderHost> provider_host, | 21 base::WeakPtr<ServiceWorkerProviderHost> provider_host, |
22 base::WeakPtr<webkit_blob::BlobStorageContext> blob_storage_context, | 22 base::WeakPtr<webkit_blob::BlobStorageContext> blob_storage_context, |
23 ResourceType::Type resource_type); | 23 ResourceType::Type resource_type); |
24 virtual ~ServiceWorkerContextRequestHandler(); | 24 virtual ~ServiceWorkerContextRequestHandler(); |
25 | 25 |
26 // Called via custom URLRequestJobFactory. | 26 // Called via custom URLRequestJobFactory. |
27 virtual net::URLRequestJob* MaybeCreateJob( | 27 virtual net::URLRequestJob* MaybeCreateJob( |
28 net::URLRequest* request, | 28 net::URLRequest* request, |
29 net::NetworkDelegate* network_delegate) OVERRIDE; | 29 net::NetworkDelegate* network_delegate) OVERRIDE; |
30 | 30 |
| 31 virtual void GetExtraResponseInfo( |
| 32 bool* was_fetched_via_service_worker, |
| 33 GURL* original_url_via_service_worker) const OVERRIDE; |
| 34 |
31 private: | 35 private: |
32 bool ShouldAddToScriptCache(const GURL& url); | 36 bool ShouldAddToScriptCache(const GURL& url); |
33 bool ShouldReadFromScriptCache(const GURL& url, int64* response_id_out); | 37 bool ShouldReadFromScriptCache(const GURL& url, int64* response_id_out); |
34 | 38 |
35 scoped_refptr<ServiceWorkerVersion> version_; | 39 scoped_refptr<ServiceWorkerVersion> version_; |
36 | 40 |
37 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextRequestHandler); | 41 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextRequestHandler); |
38 }; | 42 }; |
39 | 43 |
40 } // namespace content | 44 } // namespace content |
41 | 45 |
42 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_REQUEST_HANDLER
_H_ | 46 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTEXT_REQUEST_HANDLER
_H_ |
OLD | NEW |