Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(476)

Side by Side Diff: components/sync/test/fake_server/fake_server_entity.cc

Issue 2376123003: [Sync] Move //components/sync to the syncer namespace. (Closed)
Patch Set: Fix tools and iOS. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <stdint.h> 7 #include <stdint.h>
8 8
9 #include <limits> 9 #include <limits>
10 #include <memory> 10 #include <memory>
11 #include <string> 11 #include <string>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/guid.h" 14 #include "base/guid.h"
15 #include "base/logging.h" 15 #include "base/logging.h"
16 #include "base/memory/ref_counted.h" 16 #include "base/memory/ref_counted.h"
17 #include "base/strings/string_number_conversions.h" 17 #include "base/strings/string_number_conversions.h"
18 #include "base/strings/string_split.h" 18 #include "base/strings/string_split.h"
19 #include "base/strings/string_util.h" 19 #include "base/strings/string_util.h"
20 #include "base/strings/stringprintf.h" 20 #include "base/strings/stringprintf.h"
21 #include "components/sync/base/model_type.h" 21 #include "components/sync/base/model_type.h"
22 #include "components/sync/protocol/sync.pb.h" 22 #include "components/sync/protocol/sync.pb.h"
23 #include "net/base/net_errors.h" 23 #include "net/base/net_errors.h"
24 #include "net/http/http_status_code.h" 24 #include "net/http/http_status_code.h"
25 25
26 using std::string; 26 using std::string;
27 using std::vector; 27 using std::vector;
28
29 using syncer::ModelType; 28 using syncer::ModelType;
30 29
31 // The separator used when formatting IDs. 30 // The separator used when formatting IDs.
32 // 31 //
33 // We chose the underscore character because it doesn't conflict with the 32 // We chose the underscore character because it doesn't conflict with the
34 // special characters used by base/base64.h's encoding, which is also used in 33 // special characters used by base/base64.h's encoding, which is also used in
35 // the construction of some IDs. 34 // the construction of some IDs.
36 const char kIdSeparator[] = "_"; 35 const char kIdSeparator[] = "_";
37 36
38 namespace fake_server { 37 namespace fake_server {
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 126
128 // Data via accessors 127 // Data via accessors
129 sync_entity->set_deleted(IsDeleted()); 128 sync_entity->set_deleted(IsDeleted());
130 sync_entity->set_folder(IsFolder()); 129 sync_entity->set_folder(IsFolder());
131 130
132 if (RequiresParentId()) 131 if (RequiresParentId())
133 sync_entity->set_parent_id_string(GetParentId()); 132 sync_entity->set_parent_id_string(GetParentId());
134 } 133 }
135 134
136 } // namespace fake_server 135 } // namespace fake_server
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698