Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / sync / internal_api / events / clear_server_data_response_event.cc
blob34da27b8882407aa314a0f884021e1afe3c5d2b5
1 // Copyright 2015 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/clear_server_data_response_event.h"
7 #include "base/strings/stringprintf.h"
8 #include "sync/protocol/proto_value_conversions.h"
10 namespace syncer {
12 ClearServerDataResponseEvent::ClearServerDataResponseEvent(
13 base::Time timestamp,
14 SyncerError result,
15 const sync_pb::ClientToServerResponse& response)
16 : timestamp_(timestamp), result_(result), response_(response) {}
18 ClearServerDataResponseEvent::~ClearServerDataResponseEvent() {}
20 base::Time ClearServerDataResponseEvent::GetTimestamp() const {
21 return timestamp_;
24 std::string ClearServerDataResponseEvent::GetType() const {
25 return "ClearServerData Response";
28 std::string ClearServerDataResponseEvent::GetDetails() const {
29 return base::StringPrintf("Result: %s", GetSyncerErrorString(result_));
32 scoped_ptr<base::DictionaryValue>
33 ClearServerDataResponseEvent::GetProtoMessage() const {
34 return scoped_ptr<base::DictionaryValue>(
35 ClientToServerResponseToValue(response_, false));
38 scoped_ptr<ProtocolEvent> ClearServerDataResponseEvent::Clone() const {
39 return scoped_ptr<ProtocolEvent>(
40 new ClearServerDataResponseEvent(timestamp_, result_, response_));
43 } // namespace syncer