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