| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "sync/internal_api/public/http_post_provider_factory.h" | 10 #include "sync/internal_api/public/http_post_provider_factory.h" |
| 11 #include "sync/internal_api/public/http_post_provider_interface.h" | 11 #include "sync/internal_api/public/http_post_provider_interface.h" |
| 12 | 12 |
| 13 namespace browser_sync { | 13 namespace browser_sync { |
| 14 | 14 |
| 15 class TestHttpBridge : public csync::HttpPostProviderInterface { | 15 class TestHttpBridge : public syncer::HttpPostProviderInterface { |
| 16 public: | 16 public: |
| 17 // Begin csync::HttpPostProviderInterface implementation: | 17 // Begin syncer::HttpPostProviderInterface implementation: |
| 18 virtual void SetExtraRequestHeaders(const char * headers) OVERRIDE {} | 18 virtual void SetExtraRequestHeaders(const char * headers) OVERRIDE {} |
| 19 | 19 |
| 20 virtual void SetURL(const char* url, int port) OVERRIDE {} | 20 virtual void SetURL(const char* url, int port) OVERRIDE {} |
| 21 | 21 |
| 22 virtual void SetPostPayload(const char* content_type, | 22 virtual void SetPostPayload(const char* content_type, |
| 23 int content_length, | 23 int content_length, |
| 24 const char* content) OVERRIDE {} | 24 const char* content) OVERRIDE {} |
| 25 | 25 |
| 26 virtual bool MakeSynchronousPost(int* error_code, | 26 virtual bool MakeSynchronousPost(int* error_code, |
| 27 int* response_code) OVERRIDE; | 27 int* response_code) OVERRIDE; |
| 28 | 28 |
| 29 virtual int GetResponseContentLength() const OVERRIDE; | 29 virtual int GetResponseContentLength() const OVERRIDE; |
| 30 | 30 |
| 31 virtual const char* GetResponseContent() const OVERRIDE; | 31 virtual const char* GetResponseContent() const OVERRIDE; |
| 32 | 32 |
| 33 virtual const std::string GetResponseHeaderValue( | 33 virtual const std::string GetResponseHeaderValue( |
| 34 const std::string&) const OVERRIDE; | 34 const std::string&) const OVERRIDE; |
| 35 | 35 |
| 36 virtual void Abort() OVERRIDE; | 36 virtual void Abort() OVERRIDE; |
| 37 // End csync::HttpPostProviderInterface implementation. | 37 // End syncer::HttpPostProviderInterface implementation. |
| 38 }; | 38 }; |
| 39 | 39 |
| 40 class TestHttpBridgeFactory : public csync::HttpPostProviderFactory { | 40 class TestHttpBridgeFactory : public syncer::HttpPostProviderFactory { |
| 41 public: | 41 public: |
| 42 TestHttpBridgeFactory(); | 42 TestHttpBridgeFactory(); |
| 43 virtual ~TestHttpBridgeFactory(); | 43 virtual ~TestHttpBridgeFactory(); |
| 44 | 44 |
| 45 // csync::HttpPostProviderFactory: | 45 // syncer::HttpPostProviderFactory: |
| 46 virtual csync::HttpPostProviderInterface* Create() OVERRIDE; | 46 virtual syncer::HttpPostProviderInterface* Create() OVERRIDE; |
| 47 virtual void Destroy(csync::HttpPostProviderInterface* http) OVERRIDE; | 47 virtual void Destroy(syncer::HttpPostProviderInterface* http) OVERRIDE; |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 } // namespace browser_sync | 50 } // namespace browser_sync |
| 51 | 51 |
| 52 #endif // CHROME_BROWSER_SYNC_TEST_TEST_HTTP_BRIDGE_FACTORY_H_ | 52 #endif // CHROME_BROWSER_SYNC_TEST_TEST_HTTP_BRIDGE_FACTORY_H_ |
| OLD | NEW |