| 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/test/fake_server/fake_server.h" | 5 #include "sync/test/fake_server/fake_server.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <limits> | 10 #include <limits> |
| (...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 543 continue; | 543 continue; |
| 544 } | 544 } |
| 545 base::ListValue* list_value; | 545 base::ListValue* list_value; |
| 546 if (!dictionary->GetList(ModelTypeToString(entity.GetModelType()), | 546 if (!dictionary->GetList(ModelTypeToString(entity.GetModelType()), |
| 547 &list_value)) { | 547 &list_value)) { |
| 548 return std::unique_ptr<base::DictionaryValue>(); | 548 return std::unique_ptr<base::DictionaryValue>(); |
| 549 } | 549 } |
| 550 // TODO(pvalenzuela): Store more data for each entity so additional | 550 // TODO(pvalenzuela): Store more data for each entity so additional |
| 551 // verification can be performed. One example of additional verification | 551 // verification can be performed. One example of additional verification |
| 552 // is checking the correctness of the bookmark hierarchy. | 552 // is checking the correctness of the bookmark hierarchy. |
| 553 list_value->Append(new base::StringValue(entity.GetName())); | 553 list_value->AppendString(entity.GetName()); |
| 554 } | 554 } |
| 555 | 555 |
| 556 return dictionary; | 556 return dictionary; |
| 557 } | 557 } |
| 558 | 558 |
| 559 std::vector<sync_pb::SyncEntity> FakeServer::GetSyncEntitiesByModelType( | 559 std::vector<sync_pb::SyncEntity> FakeServer::GetSyncEntitiesByModelType( |
| 560 ModelType model_type) { | 560 ModelType model_type) { |
| 561 std::vector<sync_pb::SyncEntity> sync_entities; | 561 std::vector<sync_pb::SyncEntity> sync_entities; |
| 562 DCHECK(thread_checker_.CalledOnValidThread()); | 562 DCHECK(thread_checker_.CalledOnValidThread()); |
| 563 for (EntityMap::const_iterator it = entities_.begin(); it != entities_.end(); | 563 for (EntityMap::const_iterator it = entities_.begin(); it != entities_.end(); |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 727 DCHECK(thread_checker_.CalledOnValidThread()); | 727 DCHECK(thread_checker_.CalledOnValidThread()); |
| 728 return weak_ptr_factory_.GetWeakPtr(); | 728 return weak_ptr_factory_.GetWeakPtr(); |
| 729 } | 729 } |
| 730 | 730 |
| 731 std::string FakeServer::GetStoreBirthday() const { | 731 std::string FakeServer::GetStoreBirthday() const { |
| 732 DCHECK(thread_checker_.CalledOnValidThread()); | 732 DCHECK(thread_checker_.CalledOnValidThread()); |
| 733 return base::Int64ToString(store_birthday_); | 733 return base::Int64ToString(store_birthday_); |
| 734 } | 734 } |
| 735 | 735 |
| 736 } // namespace fake_server | 736 } // namespace fake_server |
| OLD | NEW |