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

Side by Side Diff: sync/internal_api/events/configure_get_updates_request_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 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.
4
5 #include "sync/internal_api/public/events/configure_get_updates_request_event.h"
6
7 #include "base/strings/stringprintf.h"
8 #include "sync/protocol/proto_enum_conversions.h"
9 #include "sync/protocol/proto_value_conversions.h"
10
11 namespace syncer {
12
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) { }
20
21 ConfigureGetUpdatesRequestEvent::~ConfigureGetUpdatesRequestEvent() {}
22
23 base::Time ConfigureGetUpdatesRequestEvent::GetTimestamp() const {
24 return timestamp_;
25 }
26
27 std::string ConfigureGetUpdatesRequestEvent::GetType() const {
28 return "Initial GetUpdates";
29 }
30
31 std::string ConfigureGetUpdatesRequestEvent::GetDetails() const {
32 return base::StringPrintf("Reason: %s", GetUpdatesOriginString(origin_));
33 }
34
35 std::unique_ptr<base::DictionaryValue>
36 ConfigureGetUpdatesRequestEvent::GetProtoMessage() const {
37 return std::unique_ptr<base::DictionaryValue>(
38 ClientToServerMessageToValue(request_, false));
39 }
40
41 std::unique_ptr<ProtocolEvent> ConfigureGetUpdatesRequestEvent::Clone() const {
42 return std::unique_ptr<ProtocolEvent>(
43 new ConfigureGetUpdatesRequestEvent(timestamp_, origin_, request_));
44 }
45
46 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/internal_api/events/commit_response_event.cc ('k') | sync/internal_api/events/get_updates_response_event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698