| 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/get_updates_response_event.h" | 5 #include "components/sync/engine/events/get_updates_response_event.h" |
| 6 | 6 |
| 7 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
| 8 #include "sync/protocol/proto_value_conversions.h" | 8 #include "components/sync/protocol/proto_value_conversions.h" |
| 9 | 9 |
| 10 namespace syncer { | 10 namespace syncer { |
| 11 | 11 |
| 12 GetUpdatesResponseEvent::GetUpdatesResponseEvent( | 12 GetUpdatesResponseEvent::GetUpdatesResponseEvent( |
| 13 base::Time timestamp, | 13 base::Time timestamp, |
| 14 const sync_pb::ClientToServerResponse& response, | 14 const sync_pb::ClientToServerResponse& response, |
| 15 SyncerError error) | 15 SyncerError error) |
| 16 : timestamp_(timestamp), | 16 : timestamp_(timestamp), response_(response), error_(error) {} |
| 17 response_(response), | |
| 18 error_(error) { | |
| 19 } | |
| 20 | 17 |
| 21 GetUpdatesResponseEvent::~GetUpdatesResponseEvent() {} | 18 GetUpdatesResponseEvent::~GetUpdatesResponseEvent() {} |
| 22 | 19 |
| 23 base::Time GetUpdatesResponseEvent::GetTimestamp() const { | 20 base::Time GetUpdatesResponseEvent::GetTimestamp() const { |
| 24 return timestamp_; | 21 return timestamp_; |
| 25 } | 22 } |
| 26 | 23 |
| 27 std::string GetUpdatesResponseEvent::GetType() const { | 24 std::string GetUpdatesResponseEvent::GetType() const { |
| 28 return "GetUpdates Response"; | 25 return "GetUpdates Response"; |
| 29 } | 26 } |
| (...skipping 17 matching lines...) Expand all Loading... |
| 47 return std::unique_ptr<base::DictionaryValue>( | 44 return std::unique_ptr<base::DictionaryValue>( |
| 48 ClientToServerResponseToValue(response_, false)); | 45 ClientToServerResponseToValue(response_, false)); |
| 49 } | 46 } |
| 50 | 47 |
| 51 std::unique_ptr<ProtocolEvent> GetUpdatesResponseEvent::Clone() const { | 48 std::unique_ptr<ProtocolEvent> GetUpdatesResponseEvent::Clone() const { |
| 52 return std::unique_ptr<ProtocolEvent>( | 49 return std::unique_ptr<ProtocolEvent>( |
| 53 new GetUpdatesResponseEvent(timestamp_, response_, error_)); | 50 new GetUpdatesResponseEvent(timestamp_, response_, error_)); |
| 54 } | 51 } |
| 55 | 52 |
| 56 } // namespace syncer | 53 } // namespace syncer |
| OLD | NEW |