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

Unified Diff: compiled/subscription/DownloadableSubscription.h

Issue 29426559: Issue 5137 - [emscripten] Added basic filter storage implementation (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore
Patch Set: Rebased Created May 10, 2017, 12:36 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 | « compiled/storage/FilterStorage.cpp ('k') | compiled/subscription/Subscription.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiled/subscription/DownloadableSubscription.h
===================================================================
--- a/compiled/subscription/DownloadableSubscription.h
+++ b/compiled/subscription/DownloadableSubscription.h
@@ -49,8 +49,17 @@ public:
GetDataRevision, SetDataRevision);
SUBSCRIPTION_STRING_PROPERTY(mRequiredVersion, NONE,
GetRequiredVersion, SetRequiredVersion);
SUBSCRIPTION_PROPERTY(int, mDownloadCount, NONE,
GetDownloadCount, SetDownloadCount);
BINDINGS_EXPORTED OwnedString Serialize() const;
};
+
+template<>
+inline DownloadableSubscription* Subscription::As<DownloadableSubscription>()
+{
+ if (mType != Type::DOWNLOADABLE)
+ return nullptr;
+
+ return static_cast<DownloadableSubscription*>(this);
+}
« no previous file with comments | « compiled/storage/FilterStorage.cpp ('k') | compiled/subscription/Subscription.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld