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

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

Issue 10584019: sync: Remove ClearUserData command. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test Created 8 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « sync/sync.gyp ('k') | sync/test/engine/mock_connection_manager.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 (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 // Mock ServerConnectionManager class for use in client unit tests. 5 // Mock ServerConnectionManager class for use in client unit tests.
6 6
7 #ifndef SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_ 7 #ifndef SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_
8 #define SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_ 8 #define SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_
9 #pragma once 9 #pragma once
10 10
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 void SetChangesRemaining(int64 count); 114 void SetChangesRemaining(int64 count);
115 115
116 // Add a new batch of updates after the current one. Allows multiple 116 // Add a new batch of updates after the current one. Allows multiple
117 // GetUpdates responses to be buffered up, since the syncer may 117 // GetUpdates responses to be buffered up, since the syncer may
118 // issue multiple requests during a sync cycle. 118 // issue multiple requests during a sync cycle.
119 void NextUpdateBatch(); 119 void NextUpdateBatch();
120 120
121 void FailNextPostBufferToPathCall() { countdown_to_postbuffer_fail_ = 1; } 121 void FailNextPostBufferToPathCall() { countdown_to_postbuffer_fail_ = 1; }
122 void FailNthPostBufferToPathCall(int n) { countdown_to_postbuffer_fail_ = n; } 122 void FailNthPostBufferToPathCall(int n) { countdown_to_postbuffer_fail_ = n; }
123 123
124 void SetClearUserDataResponseStatus(sync_pb::SyncEnums::ErrorType errortype);
125
126 void FailNonPeriodicGetUpdates() { fail_non_periodic_get_updates_ = true; } 124 void FailNonPeriodicGetUpdates() { fail_non_periodic_get_updates_ = true; }
127 125
128 // Simple inspectors. 126 // Simple inspectors.
129 bool client_stuck() const { return client_stuck_; } 127 bool client_stuck() const { return client_stuck_; }
130 128
131 sync_pb::ClientCommand* GetNextClientCommand(); 129 sync_pb::ClientCommand* GetNextClientCommand();
132 130
133 const std::vector<syncable::Id>& committed_ids() const { 131 const std::vector<syncable::Id>& committed_ids() const {
134 return committed_ids_; 132 return committed_ids_;
135 } 133 }
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 int num_get_updates_requests_; 342 int num_get_updates_requests_;
345 343
346 std::string next_token_; 344 std::string next_token_;
347 345
348 sync_pb::ClientToServerMessage last_request_; 346 sync_pb::ClientToServerMessage last_request_;
349 347
350 DISALLOW_COPY_AND_ASSIGN(MockConnectionManager); 348 DISALLOW_COPY_AND_ASSIGN(MockConnectionManager);
351 }; 349 };
352 350
353 #endif // SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_ 351 #endif // SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_
OLDNEW
« no previous file with comments | « sync/sync.gyp ('k') | sync/test/engine/mock_connection_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698