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/fake_server_entity.h" | 5 #include "components/sync/test/fake_server/fake_server_entity.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 #include <memory> | 8 #include <memory> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/guid.h" | 11 #include "base/guid.h" |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
14 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
15 #include "base/strings/string_split.h" | 15 #include "base/strings/string_split.h" |
16 #include "base/strings/string_util.h" | 16 #include "base/strings/string_util.h" |
17 #include "base/strings/stringprintf.h" | 17 #include "base/strings/stringprintf.h" |
18 #include "net/base/net_errors.h" | 18 #include "net/base/net_errors.h" |
19 #include "net/http/http_status_code.h" | 19 #include "net/http/http_status_code.h" |
20 | 20 |
21 using std::string; | 21 using std::string; |
22 using std::vector; | 22 using std::vector; |
| 23 |
23 using syncer::ModelType; | 24 using syncer::ModelType; |
24 | 25 |
25 // The separator used when formatting IDs. | 26 // The separator used when formatting IDs. |
26 // | 27 // |
27 // We chose the underscore character because it doesn't conflict with the | 28 // We chose the underscore character because it doesn't conflict with the |
28 // special characters used by base/base64.h's encoding, which is also used in | 29 // special characters used by base/base64.h's encoding, which is also used in |
29 // the construction of some IDs. | 30 // the construction of some IDs. |
30 const char kIdSeparator[] = "_"; | 31 const char kIdSeparator[] = "_"; |
31 | 32 |
32 namespace fake_server { | 33 namespace fake_server { |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 | 122 |
122 // Data via accessors | 123 // Data via accessors |
123 sync_entity->set_deleted(IsDeleted()); | 124 sync_entity->set_deleted(IsDeleted()); |
124 sync_entity->set_folder(IsFolder()); | 125 sync_entity->set_folder(IsFolder()); |
125 | 126 |
126 if (RequiresParentId()) | 127 if (RequiresParentId()) |
127 sync_entity->set_parent_id_string(GetParentId()); | 128 sync_entity->set_parent_id_string(GetParentId()); |
128 } | 129 } |
129 | 130 |
130 } // namespace fake_server | 131 } // namespace fake_server |
OLD | NEW |