Don't show supervised user as "already on this device" while they're being imported.
[chromium-blink-merge.git] / sync / internal_api / events / configure_get_updates_request_event.cc
blob8b487b60c862e5e9d0fe31c26fe6ff92de18c333
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "sync/internal_api/public/events/configure_get_updates_request_event.h"
7 #include "base/strings/stringprintf.h"
8 #include "sync/protocol/proto_enum_conversions.h"
9 #include "sync/protocol/proto_value_conversions.h"
11 namespace syncer {
13 ConfigureGetUpdatesRequestEvent::ConfigureGetUpdatesRequestEvent(
14 base::Time timestamp,
15 sync_pb::SyncEnums::GetUpdatesOrigin origin,
16 const sync_pb::ClientToServerMessage& request)
17 : timestamp_(timestamp),
18 origin_(origin),
19 request_(request) { }
21 ConfigureGetUpdatesRequestEvent::~ConfigureGetUpdatesRequestEvent() {}
23 base::Time ConfigureGetUpdatesRequestEvent::GetTimestamp() const {
24 return timestamp_;
27 std::string ConfigureGetUpdatesRequestEvent::GetType() const {
28 return "Initial GetUpdates";
31 std::string ConfigureGetUpdatesRequestEvent::GetDetails() const {
32 return base::StringPrintf("Reason: %s", GetUpdatesOriginString(origin_));
35 scoped_ptr<base::DictionaryValue>
36 ConfigureGetUpdatesRequestEvent::GetProtoMessage() const {
37 return scoped_ptr<base::DictionaryValue>(
38 ClientToServerMessageToValue(request_, false));
41 scoped_ptr<ProtocolEvent> ConfigureGetUpdatesRequestEvent::Clone() const {
42 return scoped_ptr<ProtocolEvent>(
43 new ConfigureGetUpdatesRequestEvent(
44 timestamp_,
45 origin_,
46 request_));
49 } // namespace syncer