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 #ifndef SYNC_TEST_FAKE_SERVER_FAKE_SERVER_H_ | 5 #ifndef SYNC_TEST_FAKE_SERVER_FAKE_SERVER_H_ |
6 #define SYNC_TEST_FAKE_SERVER_FAKE_SERVER_H_ | 6 #define SYNC_TEST_FAKE_SERVER_FAKE_SERVER_H_ |
7 | 7 |
| 8 #include <stdint.h> |
| 9 |
8 #include <map> | 10 #include <map> |
9 #include <string> | 11 #include <string> |
10 #include <vector> | 12 #include <vector> |
11 | 13 |
12 #include "base/basictypes.h" | |
13 #include "base/callback.h" | 14 #include "base/callback.h" |
14 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
15 #include "base/observer_list.h" | 16 #include "base/observer_list.h" |
16 #include "base/threading/thread_checker.h" | 17 #include "base/threading/thread_checker.h" |
17 #include "base/values.h" | 18 #include "base/values.h" |
18 #include "sync/internal_api/public/base/model_type.h" | 19 #include "sync/internal_api/public/base/model_type.h" |
19 #include "sync/protocol/sync.pb.h" | 20 #include "sync/protocol/sync.pb.h" |
20 #include "sync/test/fake_server/fake_server_entity.h" | 21 #include "sync/test/fake_server/fake_server_entity.h" |
21 | 22 |
22 namespace fake_server { | 23 namespace fake_server { |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 | 198 |
198 // Updates the |entity| to a new version and increments the version counter | 199 // Updates the |entity| to a new version and increments the version counter |
199 // that the server uses to assign versions. | 200 // that the server uses to assign versions. |
200 void UpdateEntityVersion(FakeServerEntity* entity); | 201 void UpdateEntityVersion(FakeServerEntity* entity); |
201 | 202 |
202 // Returns the store birthday. | 203 // Returns the store birthday. |
203 std::string GetStoreBirthday() const; | 204 std::string GetStoreBirthday() const; |
204 | 205 |
205 // This is the last version number assigned to an entity. The next entity will | 206 // This is the last version number assigned to an entity. The next entity will |
206 // have a version number of version_ + 1. | 207 // have a version number of version_ + 1. |
207 int64 version_; | 208 int64_t version_; |
208 | 209 |
209 // The current store birthday value. | 210 // The current store birthday value. |
210 int64 store_birthday_; | 211 int64_t store_birthday_; |
211 | 212 |
212 // Whether the server should act as if incoming connections are properly | 213 // Whether the server should act as if incoming connections are properly |
213 // authenticated. | 214 // authenticated. |
214 bool authenticated_; | 215 bool authenticated_; |
215 | 216 |
216 // All SyncEntity objects saved by the server. The key value is the entity's | 217 // All SyncEntity objects saved by the server. The key value is the entity's |
217 // id string. | 218 // id string. |
218 EntityMap entities_; | 219 EntityMap entities_; |
219 | 220 |
220 // All Keystore keys known to the server. | 221 // All Keystore keys known to the server. |
(...skipping 28 matching lines...) Expand all Loading... |
249 base::ThreadChecker thread_checker_; | 250 base::ThreadChecker thread_checker_; |
250 | 251 |
251 // Creates WeakPtr versions of the current FakeServer. This must be the last | 252 // Creates WeakPtr versions of the current FakeServer. This must be the last |
252 // data member! | 253 // data member! |
253 base::WeakPtrFactory<FakeServer> weak_ptr_factory_; | 254 base::WeakPtrFactory<FakeServer> weak_ptr_factory_; |
254 }; | 255 }; |
255 | 256 |
256 } // namespace fake_server | 257 } // namespace fake_server |
257 | 258 |
258 #endif // SYNC_TEST_FAKE_SERVER_FAKE_SERVER_H_ | 259 #endif // SYNC_TEST_FAKE_SERVER_FAKE_SERVER_H_ |
OLD | NEW |