Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1005)

Unified Diff: third_party/WebKit/Source/modules/filesystem/SyncCallbackHelper.h

Issue 2015453003: Remove unnecessary HelperResultType trait. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/filesystem/SyncCallbackHelper.h
diff --git a/third_party/WebKit/Source/modules/filesystem/SyncCallbackHelper.h b/third_party/WebKit/Source/modules/filesystem/SyncCallbackHelper.h
index ad42a1cf128484b8bb9a19f75cfb54aa12a3a085..534242f48ed259591d428219faff734fd5873778 100644
--- a/third_party/WebKit/Source/modules/filesystem/SyncCallbackHelper.h
+++ b/third_party/WebKit/Source/modules/filesystem/SyncCallbackHelper.h
@@ -47,34 +47,18 @@
namespace blink {
-template <typename ResultType, typename CallbackArg>
-struct HelperResultType {
- DISALLOW_NEW();
-public:
- typedef ResultType* ReturnType;
- typedef Member<ResultType> StorageType;
-
- static ReturnType createFromCallbackArg(CallbackArg argument)
- {
- return ResultType::create(argument);
- }
-};
-
// A helper template for FileSystemSync implementation.
template <typename SuccessCallback, typename CallbackArg, typename ResultType>
class SyncCallbackHelper final : public GarbageCollected<SyncCallbackHelper<SuccessCallback, CallbackArg, ResultType>> {
public:
typedef SyncCallbackHelper<SuccessCallback, CallbackArg, ResultType> HelperType;
- typedef HelperResultType<ResultType, CallbackArg> ResultTypeTrait;
- typedef typename ResultTypeTrait::StorageType ResultStorageType;
- typedef typename ResultTypeTrait::ReturnType ResultReturnType;
static HelperType* create()
{
return new SyncCallbackHelper();
}
- ResultReturnType getResult(ExceptionState& exceptionState)
+ ResultType* getResult(ExceptionState& exceptionState)
{
if (m_errorCode)
FileError::throwDOMException(exceptionState, m_errorCode);
@@ -163,11 +147,11 @@ private:
void setResult(CallbackArg result)
{
- m_result = ResultTypeTrait::createFromCallbackArg(result);
+ m_result = ResultType::create(result);
m_completed = true;
}
- ResultStorageType m_result;
+ Member<ResultType> m_result;
FileError::ErrorCode m_errorCode;
bool m_completed;
};
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698