This source file includes following definitions.
- request_
- GetTimestamp
- GetType
- GetDetails
- GetProtoMessage
- Clone
#include "sync/internal_api/public/events/configure_get_updates_request_event.h"
#include "base/strings/stringprintf.h"
#include "sync/protocol/proto_enum_conversions.h"
#include "sync/protocol/proto_value_conversions.h"
namespace syncer {
ConfigureGetUpdatesRequestEvent::ConfigureGetUpdatesRequestEvent(
base::Time timestamp,
sync_pb::SyncEnums::GetUpdatesOrigin origin,
const sync_pb::ClientToServerMessage& request)
: timestamp_(timestamp),
origin_(origin),
request_(request) { }
ConfigureGetUpdatesRequestEvent::~ConfigureGetUpdatesRequestEvent() {}
base::Time ConfigureGetUpdatesRequestEvent::GetTimestamp() const {
return timestamp_;
}
std::string ConfigureGetUpdatesRequestEvent::GetType() const {
return "Initial GetUpdates";
}
std::string ConfigureGetUpdatesRequestEvent::GetDetails() const {
return base::StringPrintf("Reason: %s", GetUpdatesOriginString(origin_));
}
scoped_ptr<base::DictionaryValue>
ConfigureGetUpdatesRequestEvent::GetProtoMessage() const {
return scoped_ptr<base::DictionaryValue>(
ClientToServerMessageToValue(request_, false));
}
scoped_ptr<ProtocolEvent> ConfigureGetUpdatesRequestEvent::Clone() const {
return scoped_ptr<ProtocolEvent>(
new ConfigureGetUpdatesRequestEvent(
timestamp_,
origin_,
request_));
}
}