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 #ifndef CHROME_BROWSER_SYNC_TEST_TEST_HTTP_BRIDGE_FACTORY_H_ | 5 #ifndef CHROME_BROWSER_SYNC_TEST_TEST_HTTP_BRIDGE_FACTORY_H_ |
6 #define CHROME_BROWSER_SYNC_TEST_TEST_HTTP_BRIDGE_FACTORY_H_ | 6 #define CHROME_BROWSER_SYNC_TEST_TEST_HTTP_BRIDGE_FACTORY_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "sync/internal_api/public/http_post_provider_factory.h" | 9 #include "sync/internal_api/public/http_post_provider_factory.h" |
10 #include "sync/internal_api/public/http_post_provider_interface.h" | 10 #include "sync/internal_api/public/http_post_provider_interface.h" |
11 | 11 |
| 12 namespace syncer { |
| 13 class CancelationSignal; |
| 14 } |
| 15 |
12 namespace browser_sync { | 16 namespace browser_sync { |
13 | 17 |
14 class TestHttpBridge : public syncer::HttpPostProviderInterface { | 18 class TestHttpBridge : public syncer::HttpPostProviderInterface { |
15 public: | 19 public: |
16 // Begin syncer::HttpPostProviderInterface implementation: | 20 // Begin syncer::HttpPostProviderInterface implementation: |
17 virtual void SetExtraRequestHeaders(const char * headers) OVERRIDE {} | 21 virtual void SetExtraRequestHeaders(const char * headers) OVERRIDE {} |
18 | 22 |
19 virtual void SetURL(const char* url, int port) OVERRIDE {} | 23 virtual void SetURL(const char* url, int port) OVERRIDE {} |
20 | 24 |
21 virtual void SetPostPayload(const char* content_type, | 25 virtual void SetPostPayload(const char* content_type, |
(...skipping 14 matching lines...) Expand all Loading... |
36 // End syncer::HttpPostProviderInterface implementation. | 40 // End syncer::HttpPostProviderInterface implementation. |
37 }; | 41 }; |
38 | 42 |
39 class TestHttpBridgeFactory : public syncer::HttpPostProviderFactory { | 43 class TestHttpBridgeFactory : public syncer::HttpPostProviderFactory { |
40 public: | 44 public: |
41 TestHttpBridgeFactory(); | 45 TestHttpBridgeFactory(); |
42 virtual ~TestHttpBridgeFactory(); | 46 virtual ~TestHttpBridgeFactory(); |
43 | 47 |
44 // syncer::HttpPostProviderFactory: | 48 // syncer::HttpPostProviderFactory: |
45 virtual void Init(const std::string& user_agent) OVERRIDE; | 49 virtual void Init(const std::string& user_agent) OVERRIDE; |
| 50 virtual void RegisterCancelationSignal( |
| 51 syncer::CancelationSignal* cancelation_signal) OVERRIDE; |
46 virtual syncer::HttpPostProviderInterface* Create() OVERRIDE; | 52 virtual syncer::HttpPostProviderInterface* Create() OVERRIDE; |
47 virtual void Destroy(syncer::HttpPostProviderInterface* http) OVERRIDE; | 53 virtual void Destroy(syncer::HttpPostProviderInterface* http) OVERRIDE; |
48 }; | 54 }; |
49 | 55 |
50 } // namespace browser_sync | 56 } // namespace browser_sync |
51 | 57 |
52 #endif // CHROME_BROWSER_SYNC_TEST_TEST_HTTP_BRIDGE_FACTORY_H_ | 58 #endif // CHROME_BROWSER_SYNC_TEST_TEST_HTTP_BRIDGE_FACTORY_H_ |
OLD | NEW |