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/fake_server_entity.h" | 5 #include "sync/test/fake_server/fake_server_entity.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/guid.h" | 12 #include "base/guid.h" |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
16 #include "base/strings/string_number_conversions.h" | 16 #include "base/strings/string_number_conversions.h" |
17 #include "base/strings/string_util.h" | 17 #include "base/strings/string_util.h" |
18 #include "base/strings/stringprintf.h" | 18 #include "base/strings/stringprintf.h" |
19 #include "net/base/net_errors.h" | 19 #include "net/base/net_errors.h" |
20 #include "net/http/http_status_code.h" | 20 #include "net/http/http_status_code.h" |
21 #include "sync/internal_api/public/base/model_type.h" | 21 #include "sync/internal_api/public/base/model_type.h" |
22 #include "sync/protocol/sync.pb.h" | 22 #include "sync/protocol/sync.pb.h" |
23 | 23 |
24 using std::string; | 24 using std::string; |
25 using std::vector; | 25 using std::vector; |
26 | 26 |
27 using syncer::ModelType; | 27 using syncer::ModelType; |
28 | 28 |
29 // The separator used when formatting IDs. | 29 // The separator used when formatting IDs. |
pval...(no longer on Chromium)
2014/07/24 18:10:17
Can you add a brief comment explaining why _ is ch
rlarocque
2014/07/24 18:31:17
Done.
| |
30 const char kIdSeparator[] = "/"; | 30 const char kIdSeparator[] = "_"; |
31 | 31 |
32 namespace fake_server { | 32 namespace fake_server { |
33 | 33 |
34 FakeServerEntity::~FakeServerEntity() { } | 34 FakeServerEntity::~FakeServerEntity() { } |
35 | 35 |
36 const std::string& FakeServerEntity::GetId() const { | 36 const std::string& FakeServerEntity::GetId() const { |
37 return id_; | 37 return id_; |
38 } | 38 } |
39 | 39 |
40 ModelType FakeServerEntity::GetModelType() const { | 40 ModelType FakeServerEntity::GetModelType() const { |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
98 sync_entity->set_id_string(id_); | 98 sync_entity->set_id_string(id_); |
99 sync_entity->set_version(version_); | 99 sync_entity->set_version(version_); |
100 sync_entity->set_name(name_); | 100 sync_entity->set_name(name_); |
101 | 101 |
102 // Data via accessors | 102 // Data via accessors |
103 sync_entity->set_deleted(IsDeleted()); | 103 sync_entity->set_deleted(IsDeleted()); |
104 sync_entity->set_folder(IsFolder()); | 104 sync_entity->set_folder(IsFolder()); |
105 } | 105 } |
106 | 106 |
107 } // namespace fake_server | 107 } // namespace fake_server |
OLD | NEW |