| 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 "sync/internal_api/public/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 "sync/protocol/proto_value_conversions.h" |
| 9 | 9 |
| 10 namespace syncer { | 10 namespace syncer { |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 response_.get_updates().entries_size()); | 35 response_.get_updates().entries_size()); |
| 36 case SERVER_MORE_TO_DOWNLOAD: | 36 case SERVER_MORE_TO_DOWNLOAD: |
| 37 return base::StringPrintf("Received %d update(s). Some updates remain.", | 37 return base::StringPrintf("Received %d update(s). Some updates remain.", |
| 38 response_.get_updates().entries_size()); | 38 response_.get_updates().entries_size()); |
| 39 default: | 39 default: |
| 40 return base::StringPrintf("Received error: %s", | 40 return base::StringPrintf("Received error: %s", |
| 41 GetSyncerErrorString(error_)); | 41 GetSyncerErrorString(error_)); |
| 42 } | 42 } |
| 43 } | 43 } |
| 44 | 44 |
| 45 scoped_ptr<base::DictionaryValue> | 45 std::unique_ptr<base::DictionaryValue> |
| 46 GetUpdatesResponseEvent::GetProtoMessage() const { | 46 GetUpdatesResponseEvent::GetProtoMessage() const { |
| 47 return scoped_ptr<base::DictionaryValue>( | 47 return std::unique_ptr<base::DictionaryValue>( |
| 48 ClientToServerResponseToValue(response_, false)); | 48 ClientToServerResponseToValue(response_, false)); |
| 49 } | 49 } |
| 50 | 50 |
| 51 scoped_ptr<ProtocolEvent> GetUpdatesResponseEvent::Clone() const { | 51 std::unique_ptr<ProtocolEvent> GetUpdatesResponseEvent::Clone() const { |
| 52 return scoped_ptr<ProtocolEvent>( | 52 return std::unique_ptr<ProtocolEvent>( |
| 53 new GetUpdatesResponseEvent( | 53 new GetUpdatesResponseEvent(timestamp_, response_, error_)); |
| 54 timestamp_, | |
| 55 response_, | |
| 56 error_)); | |
| 57 } | 54 } |
| 58 | 55 |
| 59 } // namespace syncer | 56 } // namespace syncer |
| OLD | NEW |