#include "google_apis/gcm/engine/instance_id_get_token_request_handler.h"
#include "base/metrics/histogram_functions.h"
#include "base/strings/string_number_conversions.h"
#include "google_apis/gcm/base/gcm_util.h"
namespace gcm {
namespace {
const char kAuthorizedEntityKey[] = …;
const char kGMSVersionKey[] = …;
const char kInstanceIDKey[] = …;
const char kScopeKey[] = …;
const char kExtraScopeKey[] = …;
const char kTimeToLiveSecondsKey[] = …;
}
InstanceIDGetTokenRequestHandler::InstanceIDGetTokenRequestHandler(
const std::string& instance_id,
const std::string& authorized_entity,
const std::string& scope,
int gcm_version,
base::TimeDelta time_to_live)
: … { … }
InstanceIDGetTokenRequestHandler::~InstanceIDGetTokenRequestHandler() = default;
void InstanceIDGetTokenRequestHandler::BuildRequestBody(std::string* body) { … }
void InstanceIDGetTokenRequestHandler::ReportStatusToUMA(
RegistrationRequest::Status status,
const std::string& subtype) { … }
void InstanceIDGetTokenRequestHandler::ReportNetErrorCodeToUMA(
int net_error_code) { … }
}