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

Side by Side Diff: components/sync/test/engine/mock_connection_manager.h

Issue 2494873003: [Sync] Allow sync start without sign-in if the local sync backend is on. (Closed)
Patch Set: Rebased on ToT. Created 4 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 COMPONENTS_SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_ 5 #ifndef COMPONENTS_SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_
6 #define COMPONENTS_SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_ 6 #define COMPONENTS_SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <bitset> 10 #include <bitset>
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 261
262 // Explicitly indicate that we will not be fetching some updates. 262 // Explicitly indicate that we will not be fetching some updates.
263 void ClearUpdatesQueue() { update_queue_.clear(); } 263 void ClearUpdatesQueue() { update_queue_.clear(); }
264 264
265 // Locate the most recent update message for purpose of alteration. 265 // Locate the most recent update message for purpose of alteration.
266 sync_pb::SyncEntity* GetMutableLastUpdate(); 266 sync_pb::SyncEntity* GetMutableLastUpdate();
267 267
268 // Adds a new progress marker to the last update. 268 // Adds a new progress marker to the last update.
269 sync_pb::DataTypeProgressMarker* AddUpdateProgressMarker(); 269 sync_pb::DataTypeProgressMarker* AddUpdateProgressMarker();
270 270
271 void ResetAuthToken() { auth_token_.clear(); }
272
271 private: 273 private:
272 sync_pb::SyncEntity* AddUpdateFull(syncable::Id id, 274 sync_pb::SyncEntity* AddUpdateFull(syncable::Id id,
273 syncable::Id parentid, 275 syncable::Id parentid,
274 const std::string& name, 276 const std::string& name,
275 int64_t version, 277 int64_t version,
276 int64_t sync_ts, 278 int64_t sync_ts,
277 bool is_dir); 279 bool is_dir);
278 sync_pb::SyncEntity* AddUpdateFull(const std::string& id, 280 sync_pb::SyncEntity* AddUpdateFull(const std::string& id,
279 const std::string& parentid, 281 const std::string& parentid,
280 const std::string& name, 282 const std::string& name,
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 std::string next_token_; 411 std::string next_token_;
410 412
411 std::vector<sync_pb::ClientToServerMessage> requests_; 413 std::vector<sync_pb::ClientToServerMessage> requests_;
412 414
413 DISALLOW_COPY_AND_ASSIGN(MockConnectionManager); 415 DISALLOW_COPY_AND_ASSIGN(MockConnectionManager);
414 }; 416 };
415 417
416 } // namespace syncer 418 } // namespace syncer
417 419
418 #endif // COMPONENTS_SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_ 420 #endif // COMPONENTS_SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698