OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 webapk; | 9 package webapk; |
10 | 10 |
11 // Response after creating or updating a WebAPK. | 11 // Response after creating or updating a WebAPK. |
12 message WebApkResponse { | 12 message WebApkResponse { |
13 // Package name to install WebAPK at. | 13 // Package name to install WebAPK at. |
14 optional string package_name = 1; | 14 optional string package_name = 1; |
15 | 15 |
16 // Version code of the WebAPK. | 16 // Version code of the WebAPK. |
17 optional string version = 2; | 17 optional string version = 2; |
18 | 18 |
19 // URL to download WebAPK. If the URL is empty, the client should not attempt | 19 // URL to download WebAPK. If the URL is empty, the client should not attempt |
20 // to download or install anything. For example, this may be empty when the | 20 // to download or install anything. For example, this may be empty when the |
21 // client requests an update even though no content has changed. The WebAPK | 21 // client requests an update even though no content has changed. The WebAPK |
22 // server can then let the client know that it is up-to-date already and does | 22 // server can then let the client know that it is up-to-date already and does |
23 // not need to spend bandwidth re-downloading a WebAPK it has. | 23 // not need to spend bandwidth re-downloading a WebAPK it has. |
24 optional string signed_download_url = 3; | 24 optional string signed_download_url = 3; |
25 | 25 |
26 // Unique id identifying session with WebAPK server. | 26 // Unique id identifying session with WebAPK server. |
27 optional string token = 6; | 27 optional string token = 6; |
28 | 28 |
29 reserved 4, 5; | 29 // This flag may be used, for example, if the WebAPK server is unable to |
| 30 // fulfill an update request and likely won't be able to fulfill subsequent |
| 31 // update requests from this WebAPK. One case where the server is unable to |
| 32 // fulfill update requests is if the Web Manifest is dynamically generated |
| 33 // based on the user's country etc. Therefore, we want the client to back off |
| 34 // from spamming update requests too often. |
| 35 optional bool relax_updates = 8; |
| 36 |
| 37 reserved 4, 5, 7; |
30 } | 38 } |
31 | 39 |
32 // Sent as part of request to create or update a WebAPK. | 40 // Sent as part of request to create or update a WebAPK. |
33 message WebApk { | 41 message WebApk { |
34 // Package name of the WebAPK. | 42 // Package name of the WebAPK. |
35 optional string package_name = 1; | 43 optional string package_name = 1; |
36 | 44 |
37 // Version code of the WebAPK. | 45 // Version code of the WebAPK. |
38 optional string version = 2; | 46 optional string version = 2; |
39 | 47 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 | 98 |
91 // Actual bytes of the image. This image may be re-encoded from the original | 99 // Actual bytes of the image. This image may be re-encoded from the original |
92 // image and may not match the murmur2 hash field above. | 100 // image and may not match the murmur2 hash field above. |
93 optional bytes image_data = 6; | 101 optional bytes image_data = 6; |
94 | 102 |
95 // Specifies Chrome's intended usages for the image. | 103 // Specifies Chrome's intended usages for the image. |
96 repeated Usage usages = 8; | 104 repeated Usage usages = 8; |
97 | 105 |
98 reserved 2, 3, 4, 7; | 106 reserved 2, 3, 4, 7; |
99 } | 107 } |
OLD | NEW |