| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef WebSyncRegistration_h | |
| 6 #define WebSyncRegistration_h | |
| 7 | |
| 8 #include "public/platform/WebPrivatePtr.h" | |
| 9 #include "public/platform/WebString.h" | |
| 10 | |
| 11 namespace blink { | |
| 12 | |
| 13 struct WebSyncRegistration { | |
| 14 enum NetworkState { | |
| 15 NetworkStateAny = 0, | |
| 16 NetworkStateAvoidCellular, | |
| 17 NetworkStateOnline, | |
| 18 NetworkStateLast = NetworkStateOnline | |
| 19 }; | |
| 20 | |
| 21 enum { UNREGISTERED_SYNC_ID = -1 }; | |
| 22 | |
| 23 WebSyncRegistration() | |
| 24 : id(UNREGISTERED_SYNC_ID), | |
| 25 tag(""), | |
| 26 networkState(NetworkState::NetworkStateOnline) {} | |
| 27 | |
| 28 WebSyncRegistration(int64_t id, | |
| 29 const WebString& registrationTag, | |
| 30 NetworkState networkState) | |
| 31 : id(id), tag(registrationTag), networkState(networkState) {} | |
| 32 | |
| 33 /* Internal identity; not exposed to JS API. */ | |
| 34 int64_t id; | |
| 35 | |
| 36 WebString tag; | |
| 37 NetworkState networkState; | |
| 38 }; | |
| 39 | |
| 40 } // namespace blink | |
| 41 | |
| 42 #endif // WebSyncRegistration_h | |
| OLD | NEW |