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

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

Issue 1414203016: [Sync] Introduce GmsCoreSyncListener. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move GetCustomPassphraseKey declaration. Created 5 years, 1 month 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 #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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 // Returns the entity ID of the Bookmark Bar folder. 139 // Returns the entity ID of the Bookmark Bar folder.
140 std::string GetBookmarkBarFolderId() const; 140 std::string GetBookmarkBarFolderId() const;
141 141
142 // Returns the current FakeServer as a WeakPtr. 142 // Returns the current FakeServer as a WeakPtr.
143 base::WeakPtr<FakeServer> AsWeakPtr(); 143 base::WeakPtr<FakeServer> AsWeakPtr();
144 144
145 private: 145 private:
146 typedef base::ScopedPtrMap<std::string, scoped_ptr<FakeServerEntity>> 146 typedef base::ScopedPtrMap<std::string, scoped_ptr<FakeServerEntity>>
147 EntityMap; 147 EntityMap;
148 148
149 // Gets FakeServer ready for syncing.
150 void Init();
151
149 // Processes a GetUpdates call. 152 // Processes a GetUpdates call.
150 bool HandleGetUpdatesRequest(const sync_pb::GetUpdatesMessage& get_updates, 153 bool HandleGetUpdatesRequest(const sync_pb::GetUpdatesMessage& get_updates,
151 sync_pb::GetUpdatesResponse* response); 154 sync_pb::GetUpdatesResponse* response);
152 155
153 // Processes a Commit call. 156 // Processes a Commit call.
154 bool HandleCommitRequest(const sync_pb::CommitMessage& message, 157 bool HandleCommitRequest(const sync_pb::CommitMessage& message,
155 const std::string& invalidator_client_id, 158 const std::string& invalidator_client_id,
156 sync_pb::CommitResponse* response); 159 sync_pb::CommitResponse* response);
157 160
158 // Creates and saves a permanent folder for Bookmarks (e.g., Bookmark Bar). 161 // Creates and saves a permanent folder for Bookmarks (e.g., Bookmark Bar).
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 base::ThreadChecker thread_checker_; 251 base::ThreadChecker thread_checker_;
249 252
250 // Creates WeakPtr versions of the current FakeServer. This must be the last 253 // Creates WeakPtr versions of the current FakeServer. This must be the last
251 // data member! 254 // data member!
252 base::WeakPtrFactory<FakeServer> weak_ptr_factory_; 255 base::WeakPtrFactory<FakeServer> weak_ptr_factory_;
253 }; 256 };
254 257
255 } // namespace fake_server 258 } // namespace fake_server
256 259
257 #endif // SYNC_TEST_FAKE_SERVER_FAKE_SERVER_H_ 260 #endif // SYNC_TEST_FAKE_SERVER_FAKE_SERVER_H_
OLDNEW
« no previous file with comments | « sync/test/fake_server/android/fake_server_helper_android.cc ('k') | sync/test/fake_server/fake_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698