Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: src/DefaultWebRequest.h

Issue 29497591: Issue 5180 - remove synchronous WebRequest interface and stop exposing of DefaultWebRequest (Closed) Base URL: https://github.com/adblockplus/libadblockplus.git
Patch Set: Created July 25, 2017, 2:31 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « libadblockplus.gyp ('k') | src/DefaultWebRequest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/DefaultWebRequest.h
diff --git a/include/AdblockPlus/DefaultWebRequest.h b/src/DefaultWebRequest.h
similarity index 86%
rename from include/AdblockPlus/DefaultWebRequest.h
rename to src/DefaultWebRequest.h
index 0c7e8721f04e6f01080a10c220c6011b4c399765..aefa5e6e1fe7ff21b5247242b0d2a9322ed2573e 100644
--- a/include/AdblockPlus/DefaultWebRequest.h
+++ b/src/DefaultWebRequest.h
@@ -18,7 +18,7 @@
#ifndef ADBLOCK_PLUS_DEFAULT_WEB_REQUEST_H
#define ADBLOCK_PLUS_DEFAULT_WEB_REQUEST_H
-#include "WebRequest.h"
+#include <AdblockPlus/IWebRequest.h>
namespace AdblockPlus
{
@@ -27,20 +27,21 @@ namespace AdblockPlus
* on other platforms. A dummy implementation that always reports failure is
* used if libcurl is not available.
*/
- class DefaultWebRequestSync : public WebRequest
+ class DefaultWebRequestSync
{
+ public:
ServerResponse GET(const std::string& url, const HeaderList& requestHeaders) const;
};
class DefaultWebRequest : public IWebRequest
{
public:
- explicit DefaultWebRequest(const WebRequestSharedPtr& syncImpl);
+ explicit DefaultWebRequest(std::unique_ptr<DefaultWebRequestSync>&& syncImpl);
~DefaultWebRequest();
void GET(const std::string& url, const HeaderList& requestHeaders, const GetCallback& getCallback) override;
private:
- WebRequestSharedPtr syncImpl;
+ std::unique_ptr<DefaultWebRequestSync> syncImpl;
};
}
« no previous file with comments | « libadblockplus.gyp ('k') | src/DefaultWebRequest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld