chromium/chrome/browser/extensions/api/gcm/gcm_api.cc

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

#include "chrome/browser/extensions/api/gcm/gcm_api.h"

#include <stddef.h>

#include <algorithm>
#include <map>
#include <memory>
#include <utility>
#include <vector>

#include "base/functional/bind.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "chrome/browser/gcm/gcm_profile_service_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/extensions/api/gcm.h"
#include "components/gcm_driver/common/gcm_message.h"
#include "components/gcm_driver/gcm_driver.h"
#include "components/gcm_driver/gcm_profile_service.h"
#include "extensions/browser/event_router.h"
#include "extensions/common/extension.h"

namespace {

const size_t kMaximumGcmMessageSize =;  // in bytes.
const char kCollapseKey[] =;
const char kGoogDotRestrictedPrefix[] =;
const char kGoogleRestrictedPrefix[] =;

// Error messages.
const char kInvalidParameter[] =;
const char kGCMDisabled[] =;
const char kAsyncOperationPending[] =;
const char kNetworkError[] =;
const char kServerError[] =;
const char kTtlExceeded[] =;
const char kUnknownError[] =;

const char* GcmResultToError(gcm::GCMClient::Result result) {}

bool IsMessageKeyValid(const std::string& key) {}

}  // namespace

namespace extensions {

bool GcmApiFunction::PreRunValidation(std::string* error) {}

bool GcmApiFunction::IsGcmApiEnabled(std::string* error) const {}

gcm::GCMDriver* GcmApiFunction::GetGCMDriver() const {}

GcmRegisterFunction::GcmRegisterFunction() {}

GcmRegisterFunction::~GcmRegisterFunction() {}

ExtensionFunction::ResponseAction GcmRegisterFunction::Run() {}

void GcmRegisterFunction::CompleteFunctionWithResult(
    const std::string& registration_id,
    gcm::GCMClient::Result gcm_result) {}

GcmUnregisterFunction::GcmUnregisterFunction() {}

GcmUnregisterFunction::~GcmUnregisterFunction() {}

ExtensionFunction::ResponseAction GcmUnregisterFunction::Run() {}

void GcmUnregisterFunction::CompleteFunctionWithResult(
    gcm::GCMClient::Result result) {}

GcmSendFunction::GcmSendFunction() {}

GcmSendFunction::~GcmSendFunction() {}

ExtensionFunction::ResponseAction GcmSendFunction::Run() {}

void GcmSendFunction::CompleteFunctionWithResult(
    const std::string& message_id,
    gcm::GCMClient::Result gcm_result) {}

bool GcmSendFunction::ValidateMessageData(const gcm::MessageData& data) const {}

GcmJsEventRouter::GcmJsEventRouter(Profile* profile) :{}

GcmJsEventRouter::~GcmJsEventRouter() {}

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

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

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

}  // namespace extensions