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

Delta Between Two Patch Sets: compiled/subscription/DownloadableSubscription.cpp

Issue 29548581: Issue 4128, 5138 - Add Parser and Serializer implemented in C++ Base URL: https://github.com/adblockplus/adblockpluscore.git
Left Patch Set: Created Sept. 18, 2017, 5:23 p.m.
Right Patch Set: rebase Created March 7, 2018, 12:01 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « compiled/subscription/DownloadableSubscription.h ('k') | compiled/subscription/Subscription.h » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-present eyeo GmbH 3 * Copyright (C) 2006-present eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details. 12 * GNU General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU General Public License 14 * You should have received a copy of the GNU General Public License
15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
16 */ 16 */
17 17
18 #include "DownloadableSubscription.h" 18 #include "DownloadableSubscription.h"
19 19
20 ABP_NS_USING
21
20 DownloadableSubscription::DownloadableSubscription(const String& id, const KeyVa lues& properties) 22 DownloadableSubscription::DownloadableSubscription(const String& id, const KeyVa lues& properties)
21 : Subscription(Type::DOWNLOADABLE, id, properties), mFixedTitle(false), mLas tCheck(0), 23 : Subscription(classType, id, properties), mFixedTitle(false), mLastCheck(0) ,
22 mHardExpiration(0), mSoftExpiration(0), mLastDownload(0), mLastSuccess(0), 24 mHardExpiration(0), mSoftExpiration(0), mLastDownload(0), mLastSuccess(0),
23 mErrorCount(0), mDataRevision(0), mDownloadCount(0) 25 mErrorCount(0), mDataRevision(0), mDownloadCount(0)
24 { 26 {
25 const auto* titleProp = findPropertyValue(properties, u"title"_str); 27 const auto* titleProp = findPropertyValue(properties, u"title"_str);
26 SetTitle(titleProp ? *titleProp : id); 28 SetTitle(titleProp ? *titleProp : id);
27 parseProperty(properties, mFixedTitle, u"fixedTitle"_str); 29 parseProperty(properties, mFixedTitle, u"fixedTitle"_str);
28 parseProperty(properties, mHomepage, u"homepage"_str); 30 parseProperty(properties, mHomepage, u"homepage"_str);
29 parseProperty(properties, mLastCheck, u"lastCheck"_str); 31 parseProperty(properties, mLastCheck, u"lastCheck"_str);
30 parseProperty(properties, mHardExpiration, u"expires"_str); 32 parseProperty(properties, mHardExpiration, u"expires"_str);
31 parseProperty(properties, mSoftExpiration, u"softExpiration"_str); 33 parseProperty(properties, mSoftExpiration, u"softExpiration"_str);
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 result.append(u'\n'); 106 result.append(u'\n');
105 } 107 }
106 if (mDownloadCount) 108 if (mDownloadCount)
107 { 109 {
108 result.append(u"downloadCount="_str); 110 result.append(u"downloadCount="_str);
109 result.append(mDownloadCount); 111 result.append(mDownloadCount);
110 result.append(u'\n'); 112 result.append(u'\n');
111 } 113 }
112 return result; 114 return result;
113 } 115 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld