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 <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 | 114 |
115 // Processes a GetUpdates call. | 115 // Processes a GetUpdates call. |
116 bool HandleGetUpdatesRequest(const sync_pb::GetUpdatesMessage& get_updates, | 116 bool HandleGetUpdatesRequest(const sync_pb::GetUpdatesMessage& get_updates, |
117 sync_pb::GetUpdatesResponse* response); | 117 sync_pb::GetUpdatesResponse* response); |
118 | 118 |
119 // Processes a Commit call. | 119 // Processes a Commit call. |
120 bool HandleCommitRequest(const sync_pb::CommitMessage& message, | 120 bool HandleCommitRequest(const sync_pb::CommitMessage& message, |
121 const std::string& invalidator_client_id, | 121 const std::string& invalidator_client_id, |
122 sync_pb::CommitResponse* response); | 122 sync_pb::CommitResponse* response); |
123 | 123 |
| 124 bool CreatePermanentBookmarkFolder(const char* server_tag, const char* name); |
| 125 |
124 // Inserts the default permanent items in |entities_|. | 126 // Inserts the default permanent items in |entities_|. |
125 bool CreateDefaultPermanentItems(); | 127 bool CreateDefaultPermanentItems(); |
126 | 128 |
127 // Inserts the mobile bookmarks folder entity in |entities_|. | 129 // Inserts the mobile bookmarks folder entity in |entities_|. |
128 bool CreateMobileBookmarksPermanentItem(); | 130 bool CreateMobileBookmarksPermanentItem(); |
129 | 131 |
130 // Saves a |entity| to |entities_|. | 132 // Saves a |entity| to |entities_|. |
131 void SaveEntity(FakeServerEntity* entity); | 133 void SaveEntity(FakeServerEntity* entity); |
132 | 134 |
133 // Commits a client-side SyncEntity to the server as a FakeServerEntity. | 135 // Commits a client-side SyncEntity to the server as a FakeServerEntity. |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 ObserverList<Observer, true> observers_; | 200 ObserverList<Observer, true> observers_; |
199 | 201 |
200 // When true, the server operates normally. When false, a failure is returned | 202 // When true, the server operates normally. When false, a failure is returned |
201 // on every request. This is used to simulate a network failure on the client. | 203 // on every request. This is used to simulate a network failure on the client. |
202 bool network_enabled_; | 204 bool network_enabled_; |
203 }; | 205 }; |
204 | 206 |
205 } // namespace fake_server | 207 } // namespace fake_server |
206 | 208 |
207 #endif // SYNC_TEST_FAKE_SERVER_FAKE_SERVER_H_ | 209 #endif // SYNC_TEST_FAKE_SERVER_FAKE_SERVER_H_ |
OLD | NEW |