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.h" | 5 #include "components/sync/test/fake_server/bookmark_entity.h" |
6 | 6 |
7 #include <stdint.h> | |
8 | |
9 #include <string> | |
10 | |
11 #include "base/guid.h" | 7 #include "base/guid.h" |
12 #include "components/sync/base/model_type.h" | |
13 #include "components/sync/protocol/sync.pb.h" | |
14 #include "components/sync/test/fake_server/fake_server_entity.h" | |
15 | 8 |
16 using std::string; | 9 using std::string; |
17 | 10 |
18 namespace fake_server { | 11 namespace fake_server { |
19 | 12 |
20 namespace { | 13 namespace { |
21 | 14 |
22 // Returns true if and only if |client_entity| is a bookmark. | 15 // Returns true if and only if |client_entity| is a bookmark. |
23 bool IsBookmark(const sync_pb::SyncEntity& client_entity) { | 16 bool IsBookmark(const sync_pb::SyncEntity& client_entity) { |
24 return syncer::GetModelType(client_entity) == syncer::BOOKMARKS; | 17 return syncer::GetModelType(client_entity) == syncer::BOOKMARKS; |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 | 111 |
119 sync_pb::UniquePosition* unique_position = proto->mutable_unique_position(); | 112 sync_pb::UniquePosition* unique_position = proto->mutable_unique_position(); |
120 unique_position->CopyFrom(unique_position_); | 113 unique_position->CopyFrom(unique_position_); |
121 } | 114 } |
122 | 115 |
123 bool BookmarkEntity::IsFolder() const { | 116 bool BookmarkEntity::IsFolder() const { |
124 return is_folder_; | 117 return is_folder_; |
125 } | 118 } |
126 | 119 |
127 } // namespace fake_server | 120 } // namespace fake_server |
OLD | NEW |