chromium/google_apis/gcm/engine/gservices_settings.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 "google_apis/gcm/engine/gservices_settings.h"

#include <stdint.h>

#include "base/command_line.h"
#include "base/functional/bind.h"
#include "base/hash/sha1.h"
#include "base/logging.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "google_apis/gcm/engine/gservices_switches.h"

namespace {
// The expected time in seconds between periodic checkins.
const char kCheckinIntervalKey[] =;
// The override URL to the checkin server.
const char kCheckinURLKey[] =;
// The MCS machine name to connect to.
const char kMCSHostnameKey[] =;
// The MCS port to connect to.
const char kMCSSecurePortKey[] =;
// The URL to get MCS registration IDs.
const char kRegistrationURLKey[] =;

const int64_t kDefaultCheckinInterval =;  // seconds = 2 days.
const int64_t kMinimumCheckinInterval =;  // seconds = 12 hours.
const char kDefaultCheckinURL[] =;
const char kDefaultMCSHostname[] =;
const int kDefaultMCSMainSecurePort =;
const int kDefaultMCSFallbackSecurePort =;
const char kDefaultRegistrationURL[] =;
// Settings that are to be deleted are marked with this prefix in checkin
// response.
const char kDeleteSettingPrefix[] =;
// Settings digest starts with verison number followed by '-'.
const char kDigestVersionPrefix[] =;
const char kMCSEnpointTemplate[] =;
const int kMaxSecurePort =;

std::string MakeMCSEndpoint(const std::string& mcs_hostname, int port) {}

// Default settings can be omitted, as GServicesSettings class provides
// reasonable defaults.
bool CanBeOmitted(const std::string& settings_name) {}

bool VerifyCheckinInterval(
    const gcm::GServicesSettings::SettingsMap& settings) {}

bool VerifyMCSEndpoint(const gcm::GServicesSettings::SettingsMap& settings) {}

bool VerifyCheckinURL(const gcm::GServicesSettings::SettingsMap& settings) {}

bool VerifyRegistrationURL(
    const gcm::GServicesSettings::SettingsMap& settings) {}

bool VerifySettings(const gcm::GServicesSettings::SettingsMap& settings) {}

}  // namespace

namespace gcm {

// static
const base::TimeDelta GServicesSettings::MinimumCheckinInterval() {}

// static
std::string GServicesSettings::CalculateDigest(const SettingsMap& settings) {}

GServicesSettings::GServicesSettings() {}

GServicesSettings::~GServicesSettings() {}

bool GServicesSettings::UpdateFromCheckinResponse(
    const checkin_proto::AndroidCheckinResponse& checkin_response) {}

void GServicesSettings::UpdateFromLoadResult(
    const GCMStore::LoadResult& load_result) {}

base::TimeDelta GServicesSettings::GetCheckinInterval() const {}

GURL GServicesSettings::GetCheckinURL() const {}

GURL GServicesSettings::GetMCSMainEndpoint() const {}

GURL GServicesSettings::GetMCSFallbackEndpoint() const {}

GURL GServicesSettings::GetRegistrationURL() const {}

}  // namespace gcm