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, updated copyright year Created Aug. 22, 2017, 11:03 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
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);
+}

Powered by Google App Engine
This is Rietveld