| 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_DATABASE_H_ | 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DATABASE_H_ |
| 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DATABASE_H_ | 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DATABASE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 STATUS_ERROR_IO_ERROR, | 46 STATUS_ERROR_IO_ERROR, |
| 47 STATUS_ERROR_CORRUPTED, | 47 STATUS_ERROR_CORRUPTED, |
| 48 STATUS_ERROR_FAILED, | 48 STATUS_ERROR_FAILED, |
| 49 STATUS_ERROR_MAX, | 49 STATUS_ERROR_MAX, |
| 50 }; | 50 }; |
| 51 | 51 |
| 52 struct CONTENT_EXPORT RegistrationData { | 52 struct CONTENT_EXPORT RegistrationData { |
| 53 // These values are immutable for the life of a registration. | 53 // These values are immutable for the life of a registration. |
| 54 int64 registration_id; | 54 int64 registration_id; |
| 55 GURL scope; | 55 GURL scope; |
| 56 GURL script; | |
| 57 | 56 |
| 58 // Versions are first stored once they successfully install and become | 57 // Versions are first stored once they successfully install and become |
| 59 // the waiting version. Then transition to the active version. The stored | 58 // the waiting version. Then transition to the active version. The stored |
| 60 // version may be in the ACTIVATED state or in the INSTALLED state. | 59 // version may be in the ACTIVATED state or in the INSTALLED state. |
| 60 GURL script; |
| 61 int64 version_id; | 61 int64 version_id; |
| 62 bool is_active; | 62 bool is_active; |
| 63 bool has_fetch_handler; | 63 bool has_fetch_handler; |
| 64 base::Time last_update_check; | 64 base::Time last_update_check; |
| 65 | 65 |
| 66 RegistrationData(); | 66 RegistrationData(); |
| 67 ~RegistrationData(); | 67 ~RegistrationData(); |
| 68 }; | 68 }; |
| 69 | 69 |
| 70 struct ResourceRecord { | 70 struct ResourceRecord { |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerDatabaseTest, DatabaseVersion); | 324 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerDatabaseTest, DatabaseVersion); |
| 325 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerDatabaseTest, GetNextAvailableIds); | 325 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerDatabaseTest, GetNextAvailableIds); |
| 326 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerDatabaseTest, DestroyDatabase); | 326 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerDatabaseTest, DestroyDatabase); |
| 327 | 327 |
| 328 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDatabase); | 328 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDatabase); |
| 329 }; | 329 }; |
| 330 | 330 |
| 331 } // namespace content | 331 } // namespace content |
| 332 | 332 |
| 333 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DATABASE_H_ | 333 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DATABASE_H_ |
| OLD | NEW |