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

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

Issue 10210009: sync: Loop committing items without downloading updates (v2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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/syncable/syncable.h ('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 24 matching lines...) Expand all
35 virtual ~MockConnectionManager(); 35 virtual ~MockConnectionManager();
36 36
37 // Overridden ServerConnectionManager functions. 37 // Overridden ServerConnectionManager functions.
38 virtual bool PostBufferToPath( 38 virtual bool PostBufferToPath(
39 PostBufferParams*, 39 PostBufferParams*,
40 const std::string& path, 40 const std::string& path,
41 const std::string& auth_token, 41 const std::string& auth_token,
42 browser_sync::ScopedServerStatusWatcher* watcher) OVERRIDE; 42 browser_sync::ScopedServerStatusWatcher* watcher) OVERRIDE;
43 43
44 // Control of commit response. 44 // Control of commit response.
45 // NOTE: Commit callback is invoked only once then reset.
45 void SetMidCommitCallback(const base::Closure& callback); 46 void SetMidCommitCallback(const base::Closure& callback);
46 void SetMidCommitObserver(MidCommitObserver* observer); 47 void SetMidCommitObserver(MidCommitObserver* observer);
47 48
48 // Set this if you want commit to perform commit time rename. Will request 49 // Set this if you want commit to perform commit time rename. Will request
49 // that the client renames all commited entries, prepending this string. 50 // that the client renames all commited entries, prepending this string.
50 void SetCommitTimeRename(std::string prepend); 51 void SetCommitTimeRename(std::string prepend);
51 52
52 // Generic versions of AddUpdate functions. Tests using these function should 53 // Generic versions of AddUpdate functions. Tests using these function should
53 // compile for both the int64 and string id based versions of the server. 54 // compile for both the int64 and string id based versions of the server.
54 // The SyncEntity returned is only valid until the Sync is completed 55 // The SyncEntity returned is only valid until the Sync is completed
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 int num_get_updates_requests_; 344 int num_get_updates_requests_;
344 345
345 std::string next_token_; 346 std::string next_token_;
346 347
347 sync_pb::ClientToServerMessage last_request_; 348 sync_pb::ClientToServerMessage last_request_;
348 349
349 DISALLOW_COPY_AND_ASSIGN(MockConnectionManager); 350 DISALLOW_COPY_AND_ASSIGN(MockConnectionManager);
350 }; 351 };
351 352
352 #endif // SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_ 353 #endif // SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_
OLDNEW
« no previous file with comments | « sync/syncable/syncable.h ('k') | sync/test/engine/mock_connection_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698