| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_PROVIDER_HOST_H_ | 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ |
| 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ | 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 private: | 158 private: |
| 159 friend class ServiceWorkerProviderHostTest; | 159 friend class ServiceWorkerProviderHostTest; |
| 160 friend class ServiceWorkerWriteToCacheJobTest; | 160 friend class ServiceWorkerWriteToCacheJobTest; |
| 161 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerContextRequestHandlerTest, | 161 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerContextRequestHandlerTest, |
| 162 UpdateBefore24Hours); | 162 UpdateBefore24Hours); |
| 163 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerContextRequestHandlerTest, | 163 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerContextRequestHandlerTest, |
| 164 UpdateAfter24Hours); | 164 UpdateAfter24Hours); |
| 165 | 165 |
| 166 // ServiceWorkerRegistration::Listener overrides. | 166 // ServiceWorkerRegistration::Listener overrides. |
| 167 void OnRegistrationFailed(ServiceWorkerRegistration* registration) override; | 167 void OnRegistrationFailed(ServiceWorkerRegistration* registration) override; |
| 168 void OnSkippedWaiting(ServiceWorkerRegistration* registration) override; |
| 168 | 169 |
| 169 // Sets the controller version field to |version| or if |version| is NULL, | 170 // Sets the controller version field to |version| or if |version| is NULL, |
| 170 // clears the field. | 171 // clears the field. |
| 171 void SetControllerVersionAttribute(ServiceWorkerVersion* version); | 172 void SetControllerVersionAttribute(ServiceWorkerVersion* version); |
| 172 | 173 |
| 173 void SendAssociateRegistrationMessage(); | 174 void SendAssociateRegistrationMessage(); |
| 174 | 175 |
| 175 // Creates a ServiceWorkerHandle to retain |version| and returns a | 176 // Creates a ServiceWorkerHandle to retain |version| and returns a |
| 176 // ServiceWorkerInfo with the handle ID to pass to the provider. The | 177 // ServiceWorkerInfo with the handle ID to pass to the provider. The |
| 177 // provider is responsible for releasing the handle. | 178 // provider is responsible for releasing the handle. |
| (...skipping 17 matching lines...) Expand all Loading... |
| 195 base::WeakPtr<ServiceWorkerContextCore> context_; | 196 base::WeakPtr<ServiceWorkerContextCore> context_; |
| 196 ServiceWorkerDispatcherHost* dispatcher_host_; | 197 ServiceWorkerDispatcherHost* dispatcher_host_; |
| 197 bool allow_association_; | 198 bool allow_association_; |
| 198 | 199 |
| 199 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); | 200 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); |
| 200 }; | 201 }; |
| 201 | 202 |
| 202 } // namespace content | 203 } // namespace content |
| 203 | 204 |
| 204 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ | 205 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ |
| OLD | NEW |