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

Unified Diff: src/DefaultFileSystem.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/DefaultFileSystem.h ('k') | src/DefaultWebRequest.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/DefaultFileSystem.cpp
diff --git a/src/DefaultFileSystem.cpp b/src/DefaultFileSystem.cpp
index 67f249286a52be2d787a345cae5cf41d9dcaa047..9453fbacbaa13a4476508bb11c651c4ba1fbbacb 100644
--- a/src/DefaultFileSystem.cpp
+++ b/src/DefaultFileSystem.cpp
@@ -68,6 +68,15 @@ namespace
#endif
}
+DefaultFileSystemSync::DefaultFileSystemSync(const std::string& path)
+ : basePath(path)
+{
+ if (!basePath.empty() && *basePath.rbegin() == PATH_SEPARATOR)
+ {
+ basePath.resize(basePath.size() - 1);
+ }
+}
+
IFileSystem::IOBuffer
DefaultFileSystemSync::Read(const std::string& path) const
{
@@ -183,16 +192,6 @@ std::string DefaultFileSystemSync::Resolve(const std::string& path) const
}
}
-void DefaultFileSystemSync::SetBasePath(const std::string& path)
-{
- basePath = path;
-
- if (*basePath.rbegin() == PATH_SEPARATOR)
- {
- basePath.resize(basePath.size() - 1);
- }
-}
-
DefaultFileSystem::DefaultFileSystem(const Scheduler& scheduler, std::unique_ptr<DefaultFileSystemSync> syncImpl)
: scheduler(scheduler), syncImpl(std::move(syncImpl))
{
« no previous file with comments | « src/DefaultFileSystem.h ('k') | src/DefaultWebRequest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld