chromium/components/invalidation/impl/fcm_invalidation_listener.cc

// 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.

#include "components/invalidation/impl/fcm_invalidation_listener.h"

#include <optional>

#include "base/functional/bind.h"
#include "base/logging.h"
#include "base/task/single_thread_task_runner.h"
#include "components/invalidation/public/invalidation.h"
#include "components/invalidation/public/invalidation_util.h"
#include "components/invalidation/public/invalidator_state.h"

namespace invalidation {

namespace {

// Insert or update the invalidation in the map at `invalidation.topic()`.
// If `map` does not have an invalidation for that topic, a copy of `inv` will
// be inserted.
// Otherwise, the existing invalidation for the topic will be replaced by `inv`
// if and only if `inv` has a higher version than `map.at(inv.topic())`.
void Upsert(std::map<Topic, Invalidation>& map,
            const std::optional<Invalidation>& invalidation) {}

}  // namespace

FCMInvalidationListener::FCMInvalidationListener(
    std::unique_ptr<FCMSyncNetworkChannel> network_channel)
    :{}

FCMInvalidationListener::~FCMInvalidationListener() {}

// static
std::unique_ptr<FCMInvalidationListener> FCMInvalidationListener::Create(
    std::unique_ptr<FCMSyncNetworkChannel> network_channel) {}

void FCMInvalidationListener::Start(
    Delegate* delegate,
    std::unique_ptr<PerUserTopicSubscriptionManager>
        per_user_topic_subscription_manager) {}

void FCMInvalidationListener::UpdateInterestedTopics(const TopicMap& topics) {}

void FCMInvalidationListener::ClearInstanceIDToken() {}

void FCMInvalidationListener::InvalidationReceived(
    const std::string& payload,
    const std::string& private_topic,
    const std::string& public_topic,
    int64_t version) {}

void FCMInvalidationListener::DispatchInvalidation(
    const Invalidation& invalidation) {}

std::optional<Invalidation> FCMInvalidationListener::EmitInvalidation(
    const Invalidation& invalidation) {}

void FCMInvalidationListener::TokenReceived(
    const std::string& instance_id_token) {}

void FCMInvalidationListener::DoSubscriptionUpdate() {}

void FCMInvalidationListener::Stop() {}

InvalidatorState FCMInvalidationListener::GetState() const {}

void FCMInvalidationListener::EmitStateChange() {}

void FCMInvalidationListener::OnFCMChannelStateChanged(FcmChannelState state) {}

void FCMInvalidationListener::OnSubscriptionChannelStateChanged(
    SubscriptionChannelState state) {}

void FCMInvalidationListener::OnSubscriptionRequestFinished(
    Topic topic,
    PerUserTopicSubscriptionManager::RequestType request_type,
    Status code) {}

}  // namespace invalidation