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 <string> | 10 #include <string> |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 GURL scope; | 57 GURL scope; |
58 | 58 |
59 // Versions are first stored once they successfully install and become | 59 // Versions are first stored once they successfully install and become |
60 // the waiting version. Then transition to the active version. The stored | 60 // the waiting version. Then transition to the active version. The stored |
61 // version may be in the ACTIVATED state or in the INSTALLED state. | 61 // version may be in the ACTIVATED state or in the INSTALLED state. |
62 GURL script; | 62 GURL script; |
63 int64 version_id; | 63 int64 version_id; |
64 bool is_active; | 64 bool is_active; |
65 bool has_fetch_handler; | 65 bool has_fetch_handler; |
66 base::Time last_update_check; | 66 base::Time last_update_check; |
| 67 base::TimeDelta max_age; |
67 | 68 |
68 // Not populated until ServiceWorkerStorage::StoreRegistration is called. | 69 // Not populated until ServiceWorkerStorage::StoreRegistration is called. |
69 int64_t resources_total_size_bytes; | 70 int64_t resources_total_size_bytes; |
70 | 71 |
71 RegistrationData(); | 72 RegistrationData(); |
72 ~RegistrationData(); | 73 ~RegistrationData(); |
73 }; | 74 }; |
74 | 75 |
75 struct ResourceRecord { | 76 struct ResourceRecord { |
76 int64 resource_id; | 77 int64 resource_id; |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 MigrateOnDiskCacheAccess); | 401 MigrateOnDiskCacheAccess); |
401 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerDiskCacheMigratorTest, | 402 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerDiskCacheMigratorTest, |
402 NotMigrateOnDatabaseAccess); | 403 NotMigrateOnDatabaseAccess); |
403 | 404 |
404 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDatabase); | 405 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDatabase); |
405 }; | 406 }; |
406 | 407 |
407 } // namespace content | 408 } // namespace content |
408 | 409 |
409 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DATABASE_H_ | 410 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DATABASE_H_ |
OLD | NEW |