| 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_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 "base/gtest_prod_util.h" | 8 #include "base/gtest_prod_util.h" |
| 9 #include "content/browser/service_worker/service_worker_request_handler.h" | 9 #include "content/browser/service_worker/service_worker_request_handler.h" |
| 10 #include "content/common/service_worker/service_worker_types.h" | 10 #include "content/common/service_worker/service_worker_types.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 base::TimeTicks* fetch_start_time, | 53 base::TimeTicks* fetch_start_time, |
| 54 base::TimeTicks* fetch_ready_time, | 54 base::TimeTicks* fetch_ready_time, |
| 55 base::TimeTicks* fetch_end_time) const OVERRIDE; | 55 base::TimeTicks* fetch_end_time) const OVERRIDE; |
| 56 | 56 |
| 57 private: | 57 private: |
| 58 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerControlleeRequestHandlerTest, | 58 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerControlleeRequestHandlerTest, |
| 59 ActivateWaitingVersion); | 59 ActivateWaitingVersion); |
| 60 typedef ServiceWorkerControlleeRequestHandler self; | 60 typedef ServiceWorkerControlleeRequestHandler self; |
| 61 | 61 |
| 62 // For main resource case. | 62 // For main resource case. |
| 63 void PrepareForMainResource(const GURL& url); | 63 void PrepareForMainResource(const net::URLRequest* request); |
| 64 void DidLookupRegistrationForMainResource( | 64 void DidLookupRegistrationForMainResource( |
| 65 ServiceWorkerStatusCode status, | 65 ServiceWorkerStatusCode status, |
| 66 const scoped_refptr<ServiceWorkerRegistration>& registration); | 66 const scoped_refptr<ServiceWorkerRegistration>& registration); |
| 67 void OnVersionStatusChanged( | 67 void OnVersionStatusChanged( |
| 68 ServiceWorkerRegistration* registration, | 68 ServiceWorkerRegistration* registration, |
| 69 ServiceWorkerVersion* version); | 69 ServiceWorkerVersion* version); |
| 70 | 70 |
| 71 // For sub resource case. | 71 // For sub resource case. |
| 72 void PrepareForSubResource(); | 72 void PrepareForSubResource(); |
| 73 | 73 |
| 74 bool is_main_resource_load_; | 74 bool is_main_resource_load_; |
| 75 scoped_refptr<ServiceWorkerURLRequestJob> job_; | 75 scoped_refptr<ServiceWorkerURLRequestJob> job_; |
| 76 FetchRequestMode request_mode_; | 76 FetchRequestMode request_mode_; |
| 77 FetchCredentialsMode credentials_mode_; | 77 FetchCredentialsMode credentials_mode_; |
| 78 RequestContextType request_context_type_; | 78 RequestContextType request_context_type_; |
| 79 RequestContextFrameType frame_type_; | 79 RequestContextFrameType frame_type_; |
| 80 scoped_refptr<ResourceRequestBody> body_; | 80 scoped_refptr<ResourceRequestBody> body_; |
| 81 base::WeakPtrFactory<ServiceWorkerControlleeRequestHandler> weak_factory_; | 81 base::WeakPtrFactory<ServiceWorkerControlleeRequestHandler> weak_factory_; |
| 82 | 82 |
| 83 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerControlleeRequestHandler); | 83 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerControlleeRequestHandler); |
| 84 }; | 84 }; |
| 85 | 85 |
| 86 } // namespace content | 86 } // namespace content |
| 87 | 87 |
| 88 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTROLLEE_REQUEST_HAND
LER_H_ | 88 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_CONTROLLEE_REQUEST_HAND
LER_H_ |
| OLD | NEW |