| 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 30 matching lines...) Expand all Loading... |
| 41 | 41 |
| 42 // Used in UMA. A new value must be appended only. | 42 // Used in UMA. A new value must be appended only. |
| 43 enum Status { | 43 enum Status { |
| 44 STATUS_OK, | 44 STATUS_OK, |
| 45 STATUS_ERROR_NOT_FOUND, | 45 STATUS_ERROR_NOT_FOUND, |
| 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 static const char* StatusToString(Status status); |
| 51 | 52 |
| 52 struct CONTENT_EXPORT RegistrationData { | 53 struct CONTENT_EXPORT RegistrationData { |
| 53 // These values are immutable for the life of a registration. | 54 // These values are immutable for the life of a registration. |
| 54 int64 registration_id; | 55 int64 registration_id; |
| 55 GURL scope; | 56 GURL scope; |
| 56 | 57 |
| 57 // Versions are first stored once they successfully install and become | 58 // Versions are first stored once they successfully install and become |
| 58 // the waiting version. Then transition to the active version. The stored | 59 // the waiting version. Then transition to the active version. The stored |
| 59 // version may be in the ACTIVATED state or in the INSTALLED state. | 60 // version may be in the ACTIVATED state or in the INSTALLED state. |
| 60 GURL script; | 61 GURL script; |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerDatabaseTest, DatabaseVersion); | 325 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerDatabaseTest, DatabaseVersion); |
| 325 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerDatabaseTest, GetNextAvailableIds); | 326 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerDatabaseTest, GetNextAvailableIds); |
| 326 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerDatabaseTest, DestroyDatabase); | 327 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerDatabaseTest, DestroyDatabase); |
| 327 | 328 |
| 328 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDatabase); | 329 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDatabase); |
| 329 }; | 330 }; |
| 330 | 331 |
| 331 } // namespace content | 332 } // namespace content |
| 332 | 333 |
| 333 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DATABASE_H_ | 334 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_DATABASE_H_ |
| OLD | NEW |