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. Note that this can be empty, and if it is, the | 19 // URL to download WebAPK. Note that this can be empty, and if it is, the |
20 // client should not attempt to download or install anything. For example, | 20 // client should not attempt to download or install anything. For example, |
21 // this may be empty when the client requests an update even though no content | 21 // this may be empty when the client requests an update even though no content |
22 // has changed. The WAM server can then let the client know that it is | 22 // has changed. The WAM server can then let the client know that it is |
23 // up-to-date already and does not need to spend bandwidth re-downloading a | 23 // up-to-date already and does not need to spend bandwidth re-downloading a |
24 // WebAPK it already has. | 24 // WebAPK it already has. |
25 optional string signed_download_url = 3; | 25 optional string signed_download_url = 3; |
26 | 26 |
27 // Unique id identifying session with WebAPK server. | 27 // Unique id identifying session with WebAPK server. |
28 optional string token = 6; | 28 optional string token = 6; |
29 | 29 |
30 reserved 4, 5; | 30 // If true, this directs the client to check for updates less frequently than |
| 31 // normal. This flag may be used, for example, if the WAM server knows that |
| 32 // the client has an up-to-date WebAPK, but the client is unable to determine |
| 33 // that for itself. Therefore, we want the client to back off from spamming |
| 34 // update requests too often. |
| 35 optional bool infrequent_updates = 8; |
| 36 |
| 37 reserved 4, 5, 7; |
31 } | 38 } |
32 | 39 |
33 // Sent as part of request to create or update a WebAPK. | 40 // Sent as part of request to create or update a WebAPK. |
34 message WebApk { | 41 message WebApk { |
35 // Package name of the WebAPK. | 42 // Package name of the WebAPK. |
36 optional string package_name = 1; | 43 optional string package_name = 1; |
37 | 44 |
38 // Version code of the WebAPK. | 45 // Version code of the WebAPK. |
39 optional string version = 2; | 46 optional string version = 2; |
40 | 47 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 // Murmur2 hash of the icon's bytes. There should not be any transformations | 89 // Murmur2 hash of the icon's bytes. There should not be any transformations |
83 // applied to the icon's bytes prior to taking the Murmur2 hash. | 90 // applied to the icon's bytes prior to taking the Murmur2 hash. |
84 optional string hash = 5; | 91 optional string hash = 5; |
85 | 92 |
86 // Actual bytes of the image. This image may be re-encoded from the original | 93 // Actual bytes of the image. This image may be re-encoded from the original |
87 // image and may not match the murmur2 hash field above. | 94 // image and may not match the murmur2 hash field above. |
88 optional bytes image_data = 6; | 95 optional bytes image_data = 6; |
89 | 96 |
90 reserved 2 to 4; | 97 reserved 2 to 4; |
91 } | 98 } |
OLD | NEW |