blob: 97d84b7e7ce886c212763a66d9325881eae6dea6 [file] [log] [blame]
Tanja Gornak20e653c2019-03-05 22:13:481// Copyright 2019 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 COMPONENTS_INVALIDATION_IMPL_CHANNELS_STATES_H_
6#define COMPONENTS_INVALIDATION_IMPL_CHANNELS_STATES_H_
7
8namespace syncer {
9
10enum class FcmChannelState {
11 NOT_STARTED,
12 // Fcm network channel is working properly.
13 ENABLED,
14 // Failed to retrieve instance id token.
15 NO_INSTANCE_ID_TOKEN,
16
17 kMaxValue = NO_INSTANCE_ID_TOKEN,
18};
19
Tanja Gornak111b3da2019-03-07 16:10:1520enum class SubscriptionChannelState {
21 NOT_STARTED,
22 ENABLED,
23 ACCESS_TOKEN_FAILURE,
24 SUBSCRIPTION_FAILURE,
25
26 kMaxValue = SUBSCRIPTION_FAILURE,
27};
28
Tanja Gornak20e653c2019-03-05 22:13:4829const char* FcmChannelStateToString(FcmChannelState state);
30
Tanja Gornak111b3da2019-03-07 16:10:1531const char* SubscriptionChannelStateToString(SubscriptionChannelState state);
32
Tanja Gornak20e653c2019-03-05 22:13:4833} // namespace syncer
34
35#endif // COMPONENTS_INVALIDATION_IMPL_CHANNELS_STATES_H_