Chromium Code Reviews| 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 #ifndef WebSyncRegistration_h | 5 #ifndef WebSyncRegistration_h |
| 6 #define WebSyncRegistration_h | 6 #define WebSyncRegistration_h |
| 7 | 7 |
| 8 #include "public/platform/WebPrivatePtr.h" | 8 #include "public/platform/WebPrivatePtr.h" |
| 9 #include "public/platform/WebString.h" | 9 #include "public/platform/WebString.h" |
| 10 | 10 |
| 11 namespace blink { | 11 namespace blink { |
| 12 | 12 |
| 13 struct WebSyncRegistrationOptions { | 13 struct WebSyncRegistration { |
| 14 enum NetworkType { | 14 enum NetworkType { |
| 15 NetworkTypeAny = 0, | 15 NetworkTypeAny = 0, |
| 16 NetworkTypeOffline, | 16 NetworkTypeOffline, |
| 17 NetworkTypeOnline, | 17 NetworkTypeOnline, |
| 18 NetworkTypeNonMobile, | 18 NetworkTypeNonMobile, |
| 19 NetworkTypeLast = NetworkTypeNonMobile | 19 NetworkTypeLast = NetworkTypeNonMobile |
| 20 }; | 20 }; |
| 21 | 21 |
| 22 WebSyncRegistrationOptions(NetworkType networkType, bool allowOnBattery, boo l idleRequired) | 22 WebSyncRegistration(const WebString& registrationId, unsigned long minDelay, |
| 23 : networkType(networkType) | 23 unsigned long maxDelay, unsigned long minPeriod, NetworkType minRequired Network, |
|
jochen (gone - plz use gerrit)
2015/03/13 14:39:03
what units do those delays have?
iclelland
2015/03/16 13:09:40
All are in milliseconds. (the suffix was removed f
| |
| 24 bool allowOnBattery, bool idleRequired) | |
| 25 : id(registrationId) | |
| 26 , minDelay(minDelay) | |
| 27 , maxDelay(maxDelay) | |
| 28 , minPeriod(minPeriod) | |
| 29 , minRequiredNetwork(minRequiredNetwork) | |
| 24 , allowOnBattery(allowOnBattery) | 30 , allowOnBattery(allowOnBattery) |
| 25 , idleRequired(idleRequired) | 31 , idleRequired(idleRequired) |
| 26 { | 32 { |
| 27 } | 33 } |
| 28 | 34 |
| 29 NetworkType networkType; | 35 WebString id; |
| 36 unsigned long minDelay; | |
| 37 unsigned long maxDelay; | |
| 38 unsigned long minPeriod; | |
| 39 NetworkType minRequiredNetwork; | |
| 30 bool allowOnBattery; | 40 bool allowOnBattery; |
| 31 bool idleRequired; | 41 bool idleRequired; |
| 32 }; | 42 }; |
| 33 | 43 |
| 34 | |
| 35 struct WebSyncRegistration { | |
| 36 WebSyncRegistration(const WebString& registrationId, const WebSyncRegistrati onOptions& options) | |
| 37 : id(registrationId) | |
| 38 , options(options) | |
| 39 { | |
| 40 } | |
| 41 | |
| 42 WebString id; | |
| 43 WebSyncRegistrationOptions options; | |
| 44 }; | |
| 45 | |
| 46 } // namespace blink | 44 } // namespace blink |
| 47 | 45 |
| 48 #endif // WebSyncRegistration_h | 46 #endif // WebSyncRegistration_h |
| OLD | NEW |