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 "base/guid.h" | 9 #include "base/guid.h" |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
11 #include "base/time/time.h" | 11 #include "base/time/time.h" |
12 #include "components/sync/base/time.h" | 12 #include "components/sync/base/time.h" |
13 #include "components/sync/base/unique_position.h" | 13 #include "components/sync/base/unique_position.h" |
14 #include "components/sync/protocol/sync.pb.h" | 14 #include "components/sync/protocol/sync.pb.h" |
15 #include "components/sync/syncable/syncable_util.h" | 15 #include "components/sync/syncable/syncable_util.h" |
16 #include "components/sync/test/fake_server/bookmark_entity.h" | 16 #include "components/sync/test/fake_server/bookmark_entity.h" |
17 | 17 |
18 using std::string; | 18 using std::string; |
| 19 |
19 using syncer::syncable::GenerateSyncableBookmarkHash; | 20 using syncer::syncable::GenerateSyncableBookmarkHash; |
20 | 21 |
21 // 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 |
22 // is overrideen immediately when saving the entity in FakeServer. | 23 // is overrideen immediately when saving the entity in FakeServer. |
23 const int64_t kUnusedVersion = 0L; | 24 const int64_t kUnusedVersion = 0L; |
24 | 25 |
25 // Default time (creation and last modified) used when creating entities. | 26 // Default time (creation and last modified) used when creating entities. |
26 const int64_t kDefaultTime = 1234L; | 27 const int64_t kDefaultTime = 1234L; |
27 | 28 |
28 namespace fake_server { | 29 namespace fake_server { |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 const string id = | 88 const string id = |
88 FakeServerEntity::CreateId(syncer::BOOKMARKS, base::GenerateGUID()); | 89 FakeServerEntity::CreateId(syncer::BOOKMARKS, base::GenerateGUID()); |
89 | 90 |
90 return base::WrapUnique<FakeServerEntity>(new BookmarkEntity( | 91 return base::WrapUnique<FakeServerEntity>(new BookmarkEntity( |
91 id, kUnusedVersion, title_, originator_cache_guid_, | 92 id, kUnusedVersion, title_, originator_cache_guid_, |
92 originator_client_item_id_, unique_position, entity_specifics, is_folder, | 93 originator_client_item_id_, unique_position, entity_specifics, is_folder, |
93 parent_id_, kDefaultTime, kDefaultTime)); | 94 parent_id_, kDefaultTime, kDefaultTime)); |
94 } | 95 } |
95 | 96 |
96 } // namespace fake_server | 97 } // namespace fake_server |
OLD | NEW |