OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 enum SyncNetworkState { |
| 12 NETWORK_STATE_ANY = 0; |
| 13 NETWORK_STATE_AVOID_CELLULAR = 1; |
| 14 NETWORK_STATE_ONLINE = 2; |
| 15 } |
| 16 |
| 17 enum SyncPowerState { |
| 18 POWER_STATE_AUTO = 0; |
| 19 POWER_STATE_AVOID_DRAINING = 1; |
| 20 } |
| 21 |
11 message BackgroundSyncRegistrationProto { | 22 message BackgroundSyncRegistrationProto { |
12 required int64 id = 1; | 23 required int64 id = 1; |
13 required string name = 2; | 24 required string name = 2; |
14 optional int64 min_period = 3; | 25 required bool fire_once = 3; |
| 26 required int64 min_period = 4; |
| 27 required SyncNetworkState network_state = 5; |
| 28 required SyncPowerState power_state = 6; |
15 } | 29 } |
16 | 30 |
17 message BackgroundSyncRegistrationsProto { | 31 message BackgroundSyncRegistrationsProto { |
18 repeated BackgroundSyncRegistrationProto registration = 1; | 32 repeated BackgroundSyncRegistrationProto registration = 1; |
19 required int64 next_registration_id = 2; | 33 required int64 next_registration_id = 2; |
20 } | 34 } |
OLD | NEW |