OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_BROWSER_SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_ | 7 #ifndef CHROME_BROWSER_SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_ |
8 #define CHROME_BROWSER_SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_ | 8 #define CHROME_BROWSER_SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_ |
9 #pragma once | 9 #pragma once |
10 | 10 |
11 #include <bitset> | 11 #include <bitset> |
12 #include <list> | 12 #include <list> |
13 #include <string> | 13 #include <string> |
14 #include <vector> | 14 #include <vector> |
15 | 15 |
16 #include "base/callback.h" | 16 #include "base/callback.h" |
17 #include "base/compiler_specific.h" | 17 #include "base/compiler_specific.h" |
18 #include "base/memory/scoped_vector.h" | 18 #include "base/memory/scoped_vector.h" |
19 #include "chrome/browser/sync/engine/net/server_connection_manager.h" | 19 #include "chrome/browser/sync/engine/net/server_connection_manager.h" |
20 #include "chrome/browser/sync/protocol/sync.pb.h" | 20 #include "chrome/browser/sync/protocol/sync.pb.h" |
21 #include "chrome/browser/sync/syncable/directory_manager.h" | 21 #include "chrome/browser/sync/syncable/directory_manager.h" |
22 #include "chrome/browser/sync/syncable/model_type.h" | 22 #include "chrome/browser/sync/syncable/model_type.h" |
23 #include "chrome/browser/sync/syncable/model_type_payload_map.h" | 23 #include "chrome/browser/sync/syncable/model_type_payload_map.h" |
24 | 24 |
25 namespace syncable { | 25 namespace syncable { |
26 class DirectoryManager; | 26 class DirectoryManager; |
27 class ScopedDirLookup; | |
28 } | |
29 namespace browser_sync { | |
30 struct HttpResponse; | |
31 } | 27 } |
32 | 28 |
33 class MockConnectionManager : public browser_sync::ServerConnectionManager { | 29 class MockConnectionManager : public browser_sync::ServerConnectionManager { |
34 public: | 30 public: |
35 class MidCommitObserver { | 31 class MidCommitObserver { |
36 public: | 32 public: |
37 virtual void Observe() = 0; | 33 virtual void Observe() = 0; |
38 | 34 |
39 protected: | 35 protected: |
40 virtual ~MidCommitObserver() {} | 36 virtual ~MidCommitObserver() {} |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 int num_get_updates_requests_; | 351 int num_get_updates_requests_; |
356 | 352 |
357 std::string next_token_; | 353 std::string next_token_; |
358 | 354 |
359 sync_pb::ClientToServerMessage last_request_; | 355 sync_pb::ClientToServerMessage last_request_; |
360 | 356 |
361 DISALLOW_COPY_AND_ASSIGN(MockConnectionManager); | 357 DISALLOW_COPY_AND_ASSIGN(MockConnectionManager); |
362 }; | 358 }; |
363 | 359 |
364 #endif // CHROME_BROWSER_SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_ | 360 #endif // CHROME_BROWSER_SYNC_TEST_ENGINE_MOCK_CONNECTION_MANAGER_H_ |
OLD | NEW |