| 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 csync::HttpPostProviderInterface { |
| 16 public: | 16 public: |
| 17 // Begin csync::HttpPostProviderInterface implementation: | 17 // Begin csync::HttpPostProviderInterface implementation: |
| 18 virtual void SetUserAgent(const char* user_agent) OVERRIDE {} | |
| 19 | |
| 20 virtual void SetExtraRequestHeaders(const char * headers) OVERRIDE {} | 18 virtual void SetExtraRequestHeaders(const char * headers) OVERRIDE {} |
| 21 | 19 |
| 22 virtual void SetURL(const char* url, int port) OVERRIDE {} | 20 virtual void SetURL(const char* url, int port) OVERRIDE {} |
| 23 | 21 |
| 24 virtual void SetPostPayload(const char* content_type, | 22 virtual void SetPostPayload(const char* content_type, |
| 25 int content_length, | 23 int content_length, |
| 26 const char* content) OVERRIDE {} | 24 const char* content) OVERRIDE {} |
| 27 | 25 |
| 28 virtual bool MakeSynchronousPost(int* error_code, | 26 virtual bool MakeSynchronousPost(int* error_code, |
| 29 int* response_code) OVERRIDE; | 27 int* response_code) OVERRIDE; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 45 virtual ~TestHttpBridgeFactory(); | 43 virtual ~TestHttpBridgeFactory(); |
| 46 | 44 |
| 47 // csync::HttpPostProviderFactory: | 45 // csync::HttpPostProviderFactory: |
| 48 virtual csync::HttpPostProviderInterface* Create() OVERRIDE; | 46 virtual csync::HttpPostProviderInterface* Create() OVERRIDE; |
| 49 virtual void Destroy(csync::HttpPostProviderInterface* http) OVERRIDE; | 47 virtual void Destroy(csync::HttpPostProviderInterface* http) OVERRIDE; |
| 50 }; | 48 }; |
| 51 | 49 |
| 52 } // namespace browser_sync | 50 } // namespace browser_sync |
| 53 | 51 |
| 54 #endif // CHROME_BROWSER_SYNC_TEST_TEST_HTTP_BRIDGE_FACTORY_H_ | 52 #endif // CHROME_BROWSER_SYNC_TEST_TEST_HTTP_BRIDGE_FACTORY_H_ |
| OLD | NEW |