OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "sync/internal_api/public/events/poll_get_updates_request_event.h" | 5 #include "components/sync/engine/events/poll_get_updates_request_event.h" |
6 | 6 |
7 #include "sync/protocol/proto_value_conversions.h" | 7 #include "components/sync/protocol/proto_value_conversions.h" |
8 | 8 |
9 namespace syncer { | 9 namespace syncer { |
10 | 10 |
11 PollGetUpdatesRequestEvent::PollGetUpdatesRequestEvent( | 11 PollGetUpdatesRequestEvent::PollGetUpdatesRequestEvent( |
12 base::Time timestamp, | 12 base::Time timestamp, |
13 const sync_pb::ClientToServerMessage& request) | 13 const sync_pb::ClientToServerMessage& request) |
14 : timestamp_(timestamp), | 14 : timestamp_(timestamp), request_(request) {} |
15 request_(request) { } | |
16 | 15 |
17 PollGetUpdatesRequestEvent::~PollGetUpdatesRequestEvent() {} | 16 PollGetUpdatesRequestEvent::~PollGetUpdatesRequestEvent() {} |
18 | 17 |
19 base::Time PollGetUpdatesRequestEvent::GetTimestamp() const { | 18 base::Time PollGetUpdatesRequestEvent::GetTimestamp() const { |
20 return timestamp_; | 19 return timestamp_; |
21 } | 20 } |
22 | 21 |
23 std::string PollGetUpdatesRequestEvent::GetType() const { | 22 std::string PollGetUpdatesRequestEvent::GetType() const { |
24 return "Poll GetUpdate request"; | 23 return "Poll GetUpdate request"; |
25 } | 24 } |
26 | 25 |
27 std::string PollGetUpdatesRequestEvent::GetDetails() const { | 26 std::string PollGetUpdatesRequestEvent::GetDetails() const { |
28 return std::string(); | 27 return std::string(); |
29 } | 28 } |
30 | 29 |
31 std::unique_ptr<base::DictionaryValue> | 30 std::unique_ptr<base::DictionaryValue> |
32 PollGetUpdatesRequestEvent::GetProtoMessage() const { | 31 PollGetUpdatesRequestEvent::GetProtoMessage() const { |
33 return std::unique_ptr<base::DictionaryValue>( | 32 return std::unique_ptr<base::DictionaryValue>( |
34 ClientToServerMessageToValue(request_, false)); | 33 ClientToServerMessageToValue(request_, false)); |
35 } | 34 } |
36 | 35 |
37 std::unique_ptr<ProtocolEvent> PollGetUpdatesRequestEvent::Clone() const { | 36 std::unique_ptr<ProtocolEvent> PollGetUpdatesRequestEvent::Clone() const { |
38 return std::unique_ptr<ProtocolEvent>( | 37 return std::unique_ptr<ProtocolEvent>( |
39 new PollGetUpdatesRequestEvent(timestamp_, request_)); | 38 new PollGetUpdatesRequestEvent(timestamp_, request_)); |
40 } | 39 } |
41 | 40 |
42 } // namespace syncer | 41 } // namespace syncer |
OLD | NEW |