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

Unified Diff: src/DefaultFileSystem.h

Issue 29499592: Issue 5183 - remove synchronous FileSystem interface and stop exposing of DefaultFileSystem (Closed) Base URL: https://github.com/adblockplus/libadblockplus.git
Patch Set: Created July 27, 2017, 9:17 a.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/DefaultFileSystem.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/DefaultFileSystem.h
diff --git a/include/AdblockPlus/DefaultFileSystem.h b/src/DefaultFileSystem.h
similarity index 89%
rename from include/AdblockPlus/DefaultFileSystem.h
rename to src/DefaultFileSystem.h
index 75ad13030b30759f5df448a7a313a58228e49b3f..19b6abfa9870ec02b40700ce79aa4f511e337f58 100644
--- a/include/AdblockPlus/DefaultFileSystem.h
+++ b/src/DefaultFileSystem.h
@@ -18,7 +18,7 @@
#ifndef ADBLOCK_PLUS_DEFAULT_FILE_SYSTEM_H
#define ADBLOCK_PLUS_DEFAULT_FILE_SYSTEM_H
-#include "FileSystem.h"
+#include <AdblockPlus/IFileSystem.h>
#ifdef _WIN32
#define PATH_SEPARATOR '\\'
@@ -29,12 +29,12 @@
namespace AdblockPlus
{
/**
- * `FileSystem` implementation that interacts directly with the operating
+ * File system implementation that interacts directly with the operating
* system's file system.
* All paths are considered relative to the base path, or to the current
* working directory if no base path is set (see `SetBasePath()`).
*/
- class DefaultFileSystemSync : public FileSystem
+ class DefaultFileSystemSync
{
public:
IFileSystem::IOBuffer Read(const std::string& path) const;
@@ -57,7 +57,7 @@ namespace AdblockPlus
class DefaultFileSystem : public IFileSystem
{
public:
- explicit DefaultFileSystem(const FileSystemSyncPtr& syncImpl);
+ explicit DefaultFileSystem(std::unique_ptr<DefaultFileSystemSync> syncImpl);
void Read(const std::string& path,
const ReadCallback& callback) const;
void Write(const std::string& path,
@@ -72,7 +72,7 @@ namespace AdblockPlus
std::string Resolve(const std::string& path) const;
private:
- FileSystemSyncPtr syncImpl;
+ std::unique_ptr<DefaultFileSystemSync> syncImpl;
};
}
« no previous file with comments | « libadblockplus.gyp ('k') | src/DefaultFileSystem.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld