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

Unified Diff: test/Prefs.cpp

Issue 29731562: Issue 6477 - separate done and error callbacks in IFileSystem::Read (Closed) Base URL: https://github.com/adblockplus/libadblockplus.git@c0a6434596a83383e37678ef3b6ecef00ed6a261
Patch Set: Created March 23, 2018, 10:58 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
« test/BaseJsTest.h ('K') | « test/FileSystemJsObject.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/Prefs.cpp
diff --git a/test/Prefs.cpp b/test/Prefs.cpp
index 545ab395a57dccd5be9c19029c40f3c9a5783ccf..a10878825128fe094686f4ff031579019696dda7 100644
--- a/test/Prefs.cpp
+++ b/test/Prefs.cpp
@@ -32,17 +32,16 @@ namespace
: prefsContents(prefsContent)
{
}
- void Read(const std::string& fileName, const ReadCallback& callback) const override
+ void Read(const std::string& fileName, const ReadCallback& callback, const Callback& errorCallback) const override
{
- scheduler([this, fileName, callback]
+ scheduler([this, fileName, callback, errorCallback]
{
if (fileName == "prefs.json" && !prefsContents.empty())
{
- callback(IOBuffer(prefsContents.cbegin(), prefsContents.cend()), "");
+ callback(IOBuffer(prefsContents.cbegin(), prefsContents.cend()));
return;
}
-
- LazyFileSystem::Read(fileName, callback);
+ LazyFileSystem::Read(fileName, callback, errorCallback);
});
}
« test/BaseJsTest.h ('K') | « test/FileSystemJsObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld