| 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 "components/sync/test/fake_server/bookmark_entity_builder.h" | 5 #include "components/sync/test/fake_server/bookmark_entity_builder.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <memory> | |
| 10 #include <string> | |
| 11 | |
| 12 #include "base/guid.h" | 9 #include "base/guid.h" |
| 13 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| 14 #include "base/time/time.h" | 11 #include "base/time/time.h" |
| 15 #include "components/sync/base/model_type.h" | |
| 16 #include "components/sync/base/time.h" | 12 #include "components/sync/base/time.h" |
| 17 #include "components/sync/base/unique_position.h" | 13 #include "components/sync/base/unique_position.h" |
| 18 #include "components/sync/protocol/sync.pb.h" | 14 #include "components/sync/protocol/sync.pb.h" |
| 19 #include "components/sync/syncable/syncable_util.h" | 15 #include "components/sync/syncable/syncable_util.h" |
| 20 #include "components/sync/test/fake_server/bookmark_entity.h" | 16 #include "components/sync/test/fake_server/bookmark_entity.h" |
| 21 #include "components/sync/test/fake_server/fake_server_entity.h" | |
| 22 #include "url/gurl.h" | |
| 23 | 17 |
| 24 using std::string; | 18 using std::string; |
| 25 | 19 |
| 26 using syncer::syncable::GenerateSyncableBookmarkHash; | 20 using syncer::syncable::GenerateSyncableBookmarkHash; |
| 27 | 21 |
| 28 // A version must be passed when creating a FakeServerEntity, but this value | 22 // A version must be passed when creating a FakeServerEntity, but this value |
| 29 // is overrideen immediately when saving the entity in FakeServer. | 23 // is overrideen immediately when saving the entity in FakeServer. |
| 30 const int64_t kUnusedVersion = 0L; | 24 const int64_t kUnusedVersion = 0L; |
| 31 | 25 |
| 32 // Default time (creation and last modified) used when creating entities. | 26 // Default time (creation and last modified) used when creating entities. |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 const string id = | 88 const string id = |
| 95 FakeServerEntity::CreateId(syncer::BOOKMARKS, base::GenerateGUID()); | 89 FakeServerEntity::CreateId(syncer::BOOKMARKS, base::GenerateGUID()); |
| 96 | 90 |
| 97 return base::WrapUnique<FakeServerEntity>(new BookmarkEntity( | 91 return base::WrapUnique<FakeServerEntity>(new BookmarkEntity( |
| 98 id, kUnusedVersion, title_, originator_cache_guid_, | 92 id, kUnusedVersion, title_, originator_cache_guid_, |
| 99 originator_client_item_id_, unique_position, entity_specifics, is_folder, | 93 originator_client_item_id_, unique_position, entity_specifics, is_folder, |
| 100 parent_id_, kDefaultTime, kDefaultTime)); | 94 parent_id_, kDefaultTime, kDefaultTime)); |
| 101 } | 95 } |
| 102 | 96 |
| 103 } // namespace fake_server | 97 } // namespace fake_server |
| OLD | NEW |