chromium/components/invalidation/impl/fcm_network_handler.h

// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef COMPONENTS_INVALIDATION_IMPL_FCM_NETWORK_HANDLER_H_
#define COMPONENTS_INVALIDATION_IMPL_FCM_NETWORK_HANDLER_H_

#include "base/memory/raw_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/time/clock.h"
#include "base/time/time.h"
#include "base/timer/timer.h"
#include "base/values.h"
#include "components/gcm_driver/gcm_app_handler.h"
#include "components/gcm_driver/instance_id/instance_id.h"
#include "components/invalidation/impl/channels_states.h"
#include "components/invalidation/impl/fcm_sync_network_channel.h"
#include "components/prefs/pref_registry_simple.h"
#include "components/prefs/pref_service.h"

namespace gcm {
class GCMDriver;
}

namespace instance_id {
class InstanceIDDriver;
}

namespace invalidation {

/*
 * The class responsible for communication via GCM channel:
 *  - It retrieves the token required for the subscription
 *  and passes it by invoking token callback.
 *  - It receives the messages and passes them to the
 *  invalidation infrustructure, so they can be converted to the
 *  invalidations and consumed by listeners.
 */
class FCMNetworkHandler : public gcm::GCMAppHandler,
                          public FCMSyncNetworkChannel {};

}  // namespace invalidation

#endif  // COMPONENTS_INVALIDATION_IMPL_FCM_NETWORK_HANDLER_H_