| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 package precache; | 7 package precache; |
| 8 | 8 |
| 9 // Chrome requires this. | 9 // Chrome requires this. |
| 10 option optimize_for = LITE_RUNTIME; | 10 option optimize_for = LITE_RUNTIME; |
| 11 | 11 |
| 12 // Quota limit and expiry time. This is stored in a database, and not | 12 // Quota limit and expiry time. This is stored in a database, and not |
| 13 // transferred via network. | 13 // transferred via network. |
| 14 message PrecacheQuota { | 14 message PrecacheQuota { |
| 15 // Represents the start time of this quota. | 15 // Represents the start time of this quota. After enough time has elapsed |
| 16 // since the start time (as defined in PrecacheFetcher::IsQuotaTimeExpired), a |
| 17 // new quota is created. |
| 16 optional int64 start_time = 1; | 18 optional int64 start_time = 1; |
| 17 | 19 |
| 18 // Maximum number of bytes that can be fetched until this quota expires. | 20 // Maximum number of bytes that can be fetched until this quota expires. |
| 21 // Initialized to PrecacheConfigurationSettings.daily_quota_total and |
| 22 // decremented for every byte downloaded. After this reaches zero, the |
| 23 // PrecacheFetcher will not download any more until a new quota window starts. |
| 19 optional uint64 remaining = 2; | 24 optional uint64 remaining = 2; |
| 20 }; | 25 }; |
| OLD | NEW |