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

Unified Diff: src/Platform.cpp

Issue 29533641: Issue 5569 - add the possibility to use synchronous WebRequest and base path in File System (Closed) Base URL: https://github.com/adblockplus/libadblockplus.git
Patch Set: Created Sept. 1, 2017, 3:32 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 | « src/DefaultWebRequest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/Platform.cpp
diff --git a/src/Platform.cpp b/src/Platform.cpp
index 1435a634ec73f66dd3bdf1e64103df906463a065..0e80c142086086fe21e9b78123a1d04e7c8809fa 100644
--- a/src/Platform.cpp
+++ b/src/Platform.cpp
@@ -37,14 +37,16 @@ TimerPtr AdblockPlus::CreateDefaultTimer()
return TimerPtr(new DefaultTimer());
}
-FileSystemPtr AdblockPlus::CreateDefaultFileSystem(const Scheduler& scheduler)
+FileSystemPtr AdblockPlus::CreateDefaultFileSystem(const Scheduler& scheduler, const std::string& basePath)
{
- return FileSystemPtr(new DefaultFileSystem(scheduler, std::unique_ptr<DefaultFileSystemSync>(new DefaultFileSystemSync())));
+ return FileSystemPtr(new DefaultFileSystem(scheduler, std::unique_ptr<DefaultFileSystemSync>(new DefaultFileSystemSync(basePath))));
}
-WebRequestPtr AdblockPlus::CreateDefaultWebRequest(const Scheduler& scheduler)
+WebRequestPtr AdblockPlus::CreateDefaultWebRequest(const Scheduler& scheduler, WebRequestSyncPtr syncImpl)
{
- return WebRequestPtr(new DefaultWebRequest(scheduler, std::unique_ptr<DefaultWebRequestSync>(new DefaultWebRequestSync())));
+ if (!syncImpl)
+ syncImpl.reset(new DefaultWebRequestSync());
+ return WebRequestPtr(new DefaultWebRequest(scheduler, std::move(syncImpl)));
}
LogSystemPtr AdblockPlus::CreateDefaultLogSystem()
« no previous file with comments | « src/DefaultWebRequest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld