| 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 syntax = "proto2"; | 5 syntax = "proto2"; |
| 6 | 6 |
| 7 option optimize_for = LITE_RUNTIME; | 7 option optimize_for = LITE_RUNTIME; |
| 8 | 8 |
| 9 package content; | 9 package content; |
| 10 | 10 |
| 11 message ServiceWorkerOriginTrialFeature { | 11 message ServiceWorkerOriginTrialFeature { |
| 12 required string name = 1; | 12 required string name = 1; |
| 13 repeated string tokens = 2; | 13 repeated string tokens = 2; |
| 14 } | 14 } |
| 15 | 15 |
| 16 message ServiceWorkerOriginTrialInfo { | 16 message ServiceWorkerOriginTrialInfo { |
| 17 repeated ServiceWorkerOriginTrialFeature features = 1; | 17 repeated ServiceWorkerOriginTrialFeature features = 1; |
| 18 } | 18 } |
| 19 | 19 |
| 20 message ServiceWorkerNavigationPreloadState { | 20 message ServiceWorkerNavigationPreloadState { |
| 21 required bool enabled = 1; | 21 required bool enabled = 1; |
| 22 optional string header = 2; | 22 optional string header = 2; |
| 23 } | 23 } |
| 24 | 24 |
| 25 message ServiceWorkerRegistrationData { | 25 message ServiceWorkerRegistrationData { |
| 26 enum ServiceWorkerUpdateViaCacheType { |
| 27 UNKNOWN = 0; |
| 28 IMPORTS = 1; |
| 29 ALL = 2; |
| 30 NONE = 3; |
| 31 } |
| 32 |
| 26 required int64 registration_id = 1; | 33 required int64 registration_id = 1; |
| 27 required string scope_url = 2; | 34 required string scope_url = 2; |
| 28 required string script_url = 3; | 35 required string script_url = 3; |
| 29 | 36 |
| 30 // Versions are first stored once they successfully install and become the | 37 // Versions are first stored once they successfully install and become the |
| 31 // waiting version. Then they are updated when they transition to the active | 38 // waiting version. Then they are updated when they transition to the active |
| 32 // version. | 39 // version. |
| 33 required int64 version_id = 4; | 40 required int64 version_id = 4; |
| 34 | 41 |
| 35 required bool is_active = 5; | 42 required bool is_active = 5; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 47 // |origin_trial_tokens| is not set. In this case, we have to start the | 54 // |origin_trial_tokens| is not set. In this case, we have to start the |
| 48 // Service Worker and load the main script resource in ServiceWorkerStorage | 55 // Service Worker and load the main script resource in ServiceWorkerStorage |
| 49 // to check the HTTP header. | 56 // to check the HTTP header. |
| 50 optional ServiceWorkerOriginTrialInfo origin_trial_tokens = 11; | 57 optional ServiceWorkerOriginTrialInfo origin_trial_tokens = 11; |
| 51 | 58 |
| 52 optional ServiceWorkerNavigationPreloadState navigation_preload_state = 12; | 59 optional ServiceWorkerNavigationPreloadState navigation_preload_state = 12; |
| 53 | 60 |
| 54 // The set of features that the worker used up until the time installation | 61 // The set of features that the worker used up until the time installation |
| 55 // completed. The values must be from blink::UseCounter::Feature enum. | 62 // completed. The values must be from blink::UseCounter::Feature enum. |
| 56 repeated uint32 used_features = 13; | 63 repeated uint32 used_features = 13; |
| 64 |
| 65 optional ServiceWorkerUpdateViaCacheType update_via_cache = 14 |
| 66 [default = IMPORTS]; |
| 57 } | 67 } |
| 58 | 68 |
| 59 message ServiceWorkerResourceRecord { | 69 message ServiceWorkerResourceRecord { |
| 60 required int64 resource_id = 1; | 70 required int64 resource_id = 1; |
| 61 required string url = 2; | 71 required string url = 2; |
| 62 optional uint64 size_bytes = 3; | 72 optional uint64 size_bytes = 3; |
| 63 } | 73 } |
| OLD | NEW |