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/bookmark_entity.h" | 5 #include "sync/test/fake_server/bookmark_entity.h" |
6 | 6 |
| 7 #include <stdint.h> |
| 8 |
7 #include <string> | 9 #include <string> |
8 | 10 |
9 #include "base/basictypes.h" | |
10 #include "base/guid.h" | 11 #include "base/guid.h" |
11 #include "sync/internal_api/public/base/model_type.h" | 12 #include "sync/internal_api/public/base/model_type.h" |
12 #include "sync/protocol/sync.pb.h" | 13 #include "sync/protocol/sync.pb.h" |
13 #include "sync/test/fake_server/fake_server_entity.h" | 14 #include "sync/test/fake_server/fake_server_entity.h" |
14 | 15 |
15 using std::string; | 16 using std::string; |
16 | 17 |
17 namespace fake_server { | 18 namespace fake_server { |
18 | 19 |
19 namespace { | 20 namespace { |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 current_bookmark_entity.originator_client_item_id_; | 65 current_bookmark_entity.originator_client_item_id_; |
65 | 66 |
66 return scoped_ptr<FakeServerEntity>(new BookmarkEntity( | 67 return scoped_ptr<FakeServerEntity>(new BookmarkEntity( |
67 client_entity.id_string(), client_entity.version(), client_entity.name(), | 68 client_entity.id_string(), client_entity.version(), client_entity.name(), |
68 originator_cache_guid, originator_client_item_id, | 69 originator_cache_guid, originator_client_item_id, |
69 client_entity.unique_position(), client_entity.specifics(), | 70 client_entity.unique_position(), client_entity.specifics(), |
70 client_entity.folder(), parent_id, client_entity.ctime(), | 71 client_entity.folder(), parent_id, client_entity.ctime(), |
71 client_entity.mtime())); | 72 client_entity.mtime())); |
72 } | 73 } |
73 | 74 |
74 BookmarkEntity::BookmarkEntity( | 75 BookmarkEntity::BookmarkEntity(const string& id, |
75 const string& id, | 76 int64_t version, |
76 int64 version, | 77 const string& name, |
77 const string& name, | 78 const string& originator_cache_guid, |
78 const string& originator_cache_guid, | 79 const string& originator_client_item_id, |
79 const string& originator_client_item_id, | 80 const sync_pb::UniquePosition& unique_position, |
80 const sync_pb::UniquePosition& unique_position, | 81 const sync_pb::EntitySpecifics& specifics, |
81 const sync_pb::EntitySpecifics& specifics, | 82 bool is_folder, |
82 bool is_folder, | 83 const string& parent_id, |
83 const string& parent_id, | 84 int64_t creation_time, |
84 int64 creation_time, | 85 int64_t last_modified_time) |
85 int64 last_modified_time) | |
86 : FakeServerEntity(id, syncer::BOOKMARKS, version, name), | 86 : FakeServerEntity(id, syncer::BOOKMARKS, version, name), |
87 originator_cache_guid_(originator_cache_guid), | 87 originator_cache_guid_(originator_cache_guid), |
88 originator_client_item_id_(originator_client_item_id), | 88 originator_client_item_id_(originator_client_item_id), |
89 unique_position_(unique_position), | 89 unique_position_(unique_position), |
90 is_folder_(is_folder), | 90 is_folder_(is_folder), |
91 parent_id_(parent_id), | 91 parent_id_(parent_id), |
92 creation_time_(creation_time), | 92 creation_time_(creation_time), |
93 last_modified_time_(last_modified_time) { | 93 last_modified_time_(last_modified_time) { |
94 SetSpecifics(specifics); | 94 SetSpecifics(specifics); |
95 } | 95 } |
(...skipping 22 matching lines...) Expand all Loading... |
118 | 118 |
119 sync_pb::UniquePosition* unique_position = proto->mutable_unique_position(); | 119 sync_pb::UniquePosition* unique_position = proto->mutable_unique_position(); |
120 unique_position->CopyFrom(unique_position_); | 120 unique_position->CopyFrom(unique_position_); |
121 } | 121 } |
122 | 122 |
123 bool BookmarkEntity::IsFolder() const { | 123 bool BookmarkEntity::IsFolder() const { |
124 return is_folder_; | 124 return is_folder_; |
125 } | 125 } |
126 | 126 |
127 } // namespace fake_server | 127 } // namespace fake_server |
OLD | NEW |