Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: sync/internal_api/events/clear_server_data_response_event.cc

Issue 2130453004: [Sync] Move //sync to //components/sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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.
4
5 #include "sync/internal_api/public/events/clear_server_data_response_event.h"
6
7 #include "base/strings/stringprintf.h"
8 #include "sync/protocol/proto_value_conversions.h"
9
10 namespace syncer {
11
12 ClearServerDataResponseEvent::ClearServerDataResponseEvent(
13 base::Time timestamp,
14 SyncerError result,
15 const sync_pb::ClientToServerResponse& response)
16 : timestamp_(timestamp), result_(result), response_(response) {}
17
18 ClearServerDataResponseEvent::~ClearServerDataResponseEvent() {}
19
20 base::Time ClearServerDataResponseEvent::GetTimestamp() const {
21 return timestamp_;
22 }
23
24 std::string ClearServerDataResponseEvent::GetType() const {
25 return "ClearServerData Response";
26 }
27
28 std::string ClearServerDataResponseEvent::GetDetails() const {
29 return base::StringPrintf("Result: %s", GetSyncerErrorString(result_));
30 }
31
32 std::unique_ptr<base::DictionaryValue>
33 ClearServerDataResponseEvent::GetProtoMessage() const {
34 return std::unique_ptr<base::DictionaryValue>(
35 ClientToServerResponseToValue(response_, false));
36 }
37
38 std::unique_ptr<ProtocolEvent> ClearServerDataResponseEvent::Clone() const {
39 return std::unique_ptr<ProtocolEvent>(
40 new ClearServerDataResponseEvent(timestamp_, result_, response_));
41 }
42
43 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/internal_api/events/clear_server_data_request_event.cc ('k') | sync/internal_api/events/commit_request_event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698