| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 STATUS_ERROR_FAILED, | 59 STATUS_ERROR_FAILED, |
| 60 STATUS_ERROR_NOT_SUPPORTED, | 60 STATUS_ERROR_NOT_SUPPORTED, |
| 61 STATUS_ERROR_MAX, | 61 STATUS_ERROR_MAX, |
| 62 }; | 62 }; |
| 63 static const char* StatusToString(Status status); | 63 static const char* StatusToString(Status status); |
| 64 | 64 |
| 65 struct CONTENT_EXPORT RegistrationData { | 65 struct CONTENT_EXPORT RegistrationData { |
| 66 // These values are immutable for the life of a registration. | 66 // These values are immutable for the life of a registration. |
| 67 int64_t registration_id; | 67 int64_t registration_id; |
| 68 GURL scope; | 68 GURL scope; |
| 69 bool use_cache; |
| 69 | 70 |
| 70 // Versions are first stored once they successfully install and become | 71 // Versions are first stored once they successfully install and become |
| 71 // the waiting version. Then transition to the active version. The stored | 72 // the waiting version. Then transition to the active version. The stored |
| 72 // version may be in the ACTIVATED state or in the INSTALLED state. | 73 // version may be in the ACTIVATED state or in the INSTALLED state. |
| 73 GURL script; | 74 GURL script; |
| 74 int64_t version_id; | 75 int64_t version_id; |
| 75 bool is_active; | 76 bool is_active; |
| 76 bool has_fetch_handler; | 77 bool has_fetch_handler; |
| 77 base::Time last_update_check; | 78 base::Time last_update_check; |
| 78 std::vector<GURL> foreign_fetch_scopes; | 79 std::vector<GURL> foreign_fetch_scopes; |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerDatabaseTest, | 402 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerDatabaseTest, |
| 402 UserData_UninitializedDatabase); | 403 UserData_UninitializedDatabase); |
| 403 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerDatabaseTest, DestroyDatabase); | 404 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerDatabaseTest, DestroyDatabase); |
| 404 | 405 |
| 405 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDatabase); | 406 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDatabase); |
| 406 }; | 407 }; |
| 407 | 408 |
| 408 } // namespace content | 409 } // namespace content |
| 409 | 410 |
| 410 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DATABASE_H_ | 411 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DATABASE_H_ |
| OLD | NEW |