| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 base::WeakPtr<storage::BlobStorageContext> blob_storage_context, | 25 base::WeakPtr<storage::BlobStorageContext> blob_storage_context, |
| 26 ResourceType resource_type); | 26 ResourceType resource_type); |
| 27 ~ServiceWorkerContextRequestHandler() override; | 27 ~ServiceWorkerContextRequestHandler() override; |
| 28 | 28 |
| 29 // Called via custom URLRequestJobFactory. | 29 // Called via custom URLRequestJobFactory. |
| 30 net::URLRequestJob* MaybeCreateJob( | 30 net::URLRequestJob* MaybeCreateJob( |
| 31 net::URLRequest* request, | 31 net::URLRequest* request, |
| 32 net::NetworkDelegate* network_delegate, | 32 net::NetworkDelegate* network_delegate, |
| 33 ResourceContext* resource_context) override; | 33 ResourceContext* resource_context) override; |
| 34 | 34 |
| 35 void GetExtraResponseInfo(ResourceResponseInfo* response_info) const override; | |
| 36 | |
| 37 private: | 35 private: |
| 38 bool ShouldAddToScriptCache(const GURL& url); | 36 bool ShouldAddToScriptCache(const GURL& url); |
| 39 bool ShouldReadFromScriptCache(const GURL& url, int64_t* resource_id_out); | 37 bool ShouldReadFromScriptCache(const GURL& url, int64_t* resource_id_out); |
| 40 | 38 |
| 41 scoped_refptr<ServiceWorkerVersion> version_; | 39 scoped_refptr<ServiceWorkerVersion> version_; |
| 42 | 40 |
| 43 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextRequestHandler); | 41 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerContextRequestHandler); |
| 44 }; | 42 }; |
| 45 | 43 |
| 46 } // namespace content | 44 } // namespace content |
| 47 | 45 |
| 48 #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 |