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

Side by Side Diff: sync/test/fake_server/fake_server.h

Issue 833243007: Refactor FakeServer::CreateDefaultPermanentItems() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « no previous file | sync/test/fake_server/fake_server.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #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
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
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_
OLDNEW
« no previous file with comments | « no previous file | sync/test/fake_server/fake_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698