OLD | NEW |
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 | 9 |
10 #include <bitset> | 10 #include <bitset> |
(...skipping 24 matching lines...) Expand all Loading... |
35 | 35 |
36 MockConnectionManager(syncable::Directory*, | 36 MockConnectionManager(syncable::Directory*, |
37 CancelationSignal* signal); | 37 CancelationSignal* signal); |
38 virtual ~MockConnectionManager(); | 38 virtual ~MockConnectionManager(); |
39 | 39 |
40 // Overridden ServerConnectionManager functions. | 40 // Overridden ServerConnectionManager functions. |
41 virtual bool PostBufferToPath( | 41 virtual bool PostBufferToPath( |
42 PostBufferParams*, | 42 PostBufferParams*, |
43 const std::string& path, | 43 const std::string& path, |
44 const std::string& auth_token, | 44 const std::string& auth_token, |
45 ScopedServerStatusWatcher* watcher) OVERRIDE; | 45 ScopedServerStatusWatcher* watcher) override; |
46 | 46 |
47 // Control of commit response. | 47 // Control of commit response. |
48 // NOTE: Commit callback is invoked only once then reset. | 48 // NOTE: Commit callback is invoked only once then reset. |
49 void SetMidCommitCallback(const base::Closure& callback); | 49 void SetMidCommitCallback(const base::Closure& callback); |
50 void SetMidCommitObserver(MidCommitObserver* observer); | 50 void SetMidCommitObserver(MidCommitObserver* observer); |
51 | 51 |
52 // Set this if you want commit to perform commit time rename. Will request | 52 // Set this if you want commit to perform commit time rename. Will request |
53 // that the client renames all commited entries, prepending this string. | 53 // that the client renames all commited entries, prepending this string. |
54 void SetCommitTimeRename(std::string prepend); | 54 void SetCommitTimeRename(std::string prepend); |
55 | 55 |
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 std::string next_token_; | 397 std::string next_token_; |
398 | 398 |
399 std::vector<sync_pb::ClientToServerMessage> requests_; | 399 std::vector<sync_pb::ClientToServerMessage> requests_; |
400 | 400 |
401 DISALLOW_COPY_AND_ASSIGN(MockConnectionManager); | 401 DISALLOW_COPY_AND_ASSIGN(MockConnectionManager); |
402 }; | 402 }; |
403 | 403 |
404 } // namespace syncer | 404 } // namespace syncer |
405 | 405 |
406 #endif // SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_ | 406 #endif // SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_ |
OLD | NEW |