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_REQUEST_HANDLER_H_ | 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REQUEST_HANDLER_H_ |
6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REQUEST_HANDLER_H_ | 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REQUEST_HANDLER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "base/supports_user_data.h" | 10 #include "base/supports_user_data.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 // TODO(kinuko): While utilizing UserData to attach data to URLRequest | 40 // TODO(kinuko): While utilizing UserData to attach data to URLRequest |
41 // has some precedence, it might be better to attach this handler in a more | 41 // has some precedence, it might be better to attach this handler in a more |
42 // explicit way within content layer, e.g. have ResourceRequestInfoImpl | 42 // explicit way within content layer, e.g. have ResourceRequestInfoImpl |
43 // own it. | 43 // own it. |
44 static void InitializeHandler( | 44 static void InitializeHandler( |
45 net::URLRequest* request, | 45 net::URLRequest* request, |
46 ServiceWorkerContextWrapper* context_wrapper, | 46 ServiceWorkerContextWrapper* context_wrapper, |
47 storage::BlobStorageContext* blob_storage_context, | 47 storage::BlobStorageContext* blob_storage_context, |
48 int process_id, | 48 int process_id, |
49 int provider_id, | 49 int provider_id, |
| 50 bool skip_service_worker, |
50 ResourceType resource_type, | 51 ResourceType resource_type, |
51 scoped_refptr<ResourceRequestBody> body); | 52 scoped_refptr<ResourceRequestBody> body); |
52 | 53 |
53 // Returns the handler attached to |request|. This may return NULL | 54 // Returns the handler attached to |request|. This may return NULL |
54 // if no handler is attached. | 55 // if no handler is attached. |
55 static ServiceWorkerRequestHandler* GetHandler( | 56 static ServiceWorkerRequestHandler* GetHandler( |
56 net::URLRequest* request); | 57 net::URLRequest* request); |
57 | 58 |
58 // Creates a protocol interceptor for ServiceWorker. | 59 // Creates a protocol interceptor for ServiceWorker. |
59 static scoped_ptr<net::URLRequestInterceptor> CreateInterceptor(); | 60 static scoped_ptr<net::URLRequestInterceptor> CreateInterceptor(); |
(...skipping 21 matching lines...) Expand all Loading... |
81 base::WeakPtr<storage::BlobStorageContext> blob_storage_context_; | 82 base::WeakPtr<storage::BlobStorageContext> blob_storage_context_; |
82 ResourceType resource_type_; | 83 ResourceType resource_type_; |
83 | 84 |
84 private: | 85 private: |
85 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRequestHandler); | 86 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerRequestHandler); |
86 }; | 87 }; |
87 | 88 |
88 } // namespace content | 89 } // namespace content |
89 | 90 |
90 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REQUEST_HANDLER_H_ | 91 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_REQUEST_HANDLER_H_ |
OLD | NEW |