chromium/components/gcm_driver/gcm_account_mapper.cc

// Copyright 2014 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/gcm_driver/gcm_account_mapper.h"

#include <utility>

#include "base/functional/bind.h"
#include "base/metrics/histogram_functions.h"
#include "base/time/clock.h"
#include "base/time/default_clock.h"
#include "base/uuid.h"
#include "components/gcm_driver/gcm_driver_desktop.h"
#include "google_apis/gcm/engine/gcm_store.h"

namespace gcm {

namespace {

const char kGCMAccountMapperSenderId[] =;
const char kGCMAccountMapperSendTo[] =;
const int kGCMAddMappingMessageTTL =;  // 0.5 hours in seconds.
const int kGCMRemoveMappingMessageTTL =;  // 1 day in seconds.
const int kGCMUpdateIntervalHours =;
// Because adding an account mapping dependents on a fresh OAuth2 token, we
// allow the update to happen earlier than update due time, if it is within
// the early start time to take advantage of that token.
const int kGCMUpdateEarlyStartHours =;
const char kRegistrationIdMessgaeKey[] =;
const char kTokenMessageKey[] =;
const char kAccountMessageKey[] =;
const char kRemoveAccountKey[] =;
const char kRemoveAccountValue[] =;
// Use to handle send to Gaia ID scenario:
const char kGCMSendToGaiaIdAppIdKey[] =;


std::string GenerateMessageID() {}

}  // namespace

const char kGCMAccountMapperAppId[] =;

GCMAccountMapper::GCMAccountMapper(GCMDriver* gcm_driver)
    :{}

GCMAccountMapper::~GCMAccountMapper() = default;

void GCMAccountMapper::Initialize(const AccountMappings& account_mappings,
                                  const DispatchMessageCallback& callback) {}

void GCMAccountMapper::SetAccountTokens(
    const std::vector<GCMClient::AccountTokenInfo>& account_tokens) {}

void GCMAccountMapper::ShutdownHandler() {}

void GCMAccountMapper::OnStoreReset() {}

void GCMAccountMapper::OnMessage(const std::string& app_id,
                                 const IncomingMessage& message) {}

void GCMAccountMapper::OnMessagesDeleted(const std::string& app_id) {}

void GCMAccountMapper::OnSendError(
    const std::string& app_id,
    const GCMClient::SendErrorDetails& send_error_details) {}

void GCMAccountMapper::OnSendAcknowledged(const std::string& app_id,
                                          const std::string& message_id) {}

bool GCMAccountMapper::CanHandle(const std::string& app_id) const {}

bool GCMAccountMapper::IsReady() {}

void GCMAccountMapper::SendAddMappingMessage(AccountMapping& account_mapping) {}

void GCMAccountMapper::SendRemoveMappingMessage(
    AccountMapping& account_mapping) {}

void GCMAccountMapper::CreateAndSendMessage(
    const AccountMapping& account_mapping) {}

void GCMAccountMapper::OnSendFinished(const CoreAccountId& account_id,
                                      const std::string& message_id,
                                      GCMClient::Result result) {}

void GCMAccountMapper::GetRegistration() {}

void GCMAccountMapper::OnRegisterFinished(const std::string& registration_id,
                                          GCMClient::Result result) {}

bool GCMAccountMapper::CanTriggerUpdate(
    const base::Time& last_update_time) const {}

bool GCMAccountMapper::IsLastStatusChangeOlderThanTTL(
    const AccountMapping& account_mapping) const {}

AccountMapping* GCMAccountMapper::FindMappingByAccountId(
    const CoreAccountId& account_id) {}

GCMAccountMapper::AccountMappings::iterator
GCMAccountMapper::FindMappingByMessageId(const std::string& message_id) {}

void GCMAccountMapper::SetClockForTesting(base::Clock* clock) {}

}  // namespace gcm