| OLD | NEW | 
|---|
| 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 | 
| (...skipping 13 matching lines...) Expand all  Loading... | 
| 24       mHardExpiration(0), mSoftExpiration(0), mLastDownload(0), mLastSuccess(0), | 24       mHardExpiration(0), mSoftExpiration(0), mLastDownload(0), mLastSuccess(0), | 
| 25       mErrorCount(0), mDataRevision(0), mDownloadCount(0) | 25       mErrorCount(0), mDataRevision(0), mDownloadCount(0) | 
| 26 { | 26 { | 
| 27   SetTitle(id); | 27   SetTitle(id); | 
| 28 } | 28 } | 
| 29 | 29 | 
| 30 OwnedString DownloadableSubscription::Serialize() const | 30 OwnedString DownloadableSubscription::Serialize() const | 
| 31 { | 31 { | 
| 32   OwnedString result(Subscription::Serialize()); | 32   OwnedString result(Subscription::Serialize()); | 
| 33   if (mFixedTitle) | 33   if (mFixedTitle) | 
| 34     result.append(u"fixedTitle=true\n"_str); | 34     result.append(ABP_TEXT("fixedTitle=true\n"_str)); | 
| 35   if (!mHomepage.empty()) | 35   if (!mHomepage.empty()) | 
| 36   { | 36   { | 
| 37     result.append(u"homepage="_str); | 37     result.append(ABP_TEXT("homepage="_str)); | 
| 38     result.append(mHomepage); | 38     result.append(mHomepage); | 
| 39     result.append(u'\n'); | 39     result.append(ABP_TEXT('\n')); | 
| 40   } | 40   } | 
| 41   if (mLastCheck) | 41   if (mLastCheck) | 
| 42   { | 42   { | 
| 43     result.append(u"lastCheck="_str); | 43     result.append(ABP_TEXT("lastCheck="_str)); | 
| 44     result.append(mLastCheck); | 44     result.append(mLastCheck); | 
| 45     result.append(u'\n'); | 45     result.append(ABP_TEXT('\n')); | 
| 46   } | 46   } | 
| 47   if (mHardExpiration) | 47   if (mHardExpiration) | 
| 48   { | 48   { | 
| 49     result.append(u"expires="_str); | 49     result.append(ABP_TEXT("expires="_str)); | 
| 50     result.append(mHardExpiration); | 50     result.append(mHardExpiration); | 
| 51     result.append(u'\n'); | 51     result.append(ABP_TEXT('\n')); | 
| 52   } | 52   } | 
| 53   if (mSoftExpiration) | 53   if (mSoftExpiration) | 
| 54   { | 54   { | 
| 55     result.append(u"softExpiration="_str); | 55     result.append(ABP_TEXT("softExpiration="_str)); | 
| 56     result.append(mSoftExpiration); | 56     result.append(mSoftExpiration); | 
| 57     result.append(u'\n'); | 57     result.append(ABP_TEXT('\n')); | 
| 58   } | 58   } | 
| 59   if (mLastDownload) | 59   if (mLastDownload) | 
| 60   { | 60   { | 
| 61     result.append(u"lastDownload="_str); | 61     result.append(ABP_TEXT("lastDownload="_str)); | 
| 62     result.append(mLastDownload); | 62     result.append(mLastDownload); | 
| 63     result.append(u'\n'); | 63     result.append(ABP_TEXT('\n')); | 
| 64   } | 64   } | 
| 65   if (!mDownloadStatus.empty()) | 65   if (!mDownloadStatus.empty()) | 
| 66   { | 66   { | 
| 67     result.append(u"downloadStatus="_str); | 67     result.append(ABP_TEXT("downloadStatus="_str)); | 
| 68     result.append(mDownloadStatus); | 68     result.append(mDownloadStatus); | 
| 69     result.append(u'\n'); | 69     result.append(ABP_TEXT('\n')); | 
| 70   } | 70   } | 
| 71   if (mLastSuccess) | 71   if (mLastSuccess) | 
| 72   { | 72   { | 
| 73     result.append(u"lastSuccess="_str); | 73     result.append(ABP_TEXT("lastSuccess="_str)); | 
| 74     result.append(mLastSuccess); | 74     result.append(mLastSuccess); | 
| 75     result.append(u'\n'); | 75     result.append(ABP_TEXT('\n')); | 
| 76   } | 76   } | 
| 77   if (mErrorCount) | 77   if (mErrorCount) | 
| 78   { | 78   { | 
| 79     result.append(u"errors="_str); | 79     result.append(ABP_TEXT("errors="_str)); | 
| 80     result.append(mErrorCount); | 80     result.append(mErrorCount); | 
| 81     result.append(u'\n'); | 81     result.append(ABP_TEXT('\n')); | 
| 82   } | 82   } | 
| 83   if (mDataRevision) | 83   if (mDataRevision) | 
| 84   { | 84   { | 
| 85     result.append(u"version="_str); | 85     result.append(ABP_TEXT("version="_str)); | 
| 86     result.append(mDataRevision); | 86     result.append(mDataRevision); | 
| 87     result.append(u'\n'); | 87     result.append(ABP_TEXT('\n')); | 
| 88   } | 88   } | 
| 89   if (!mRequiredVersion.empty()) | 89   if (!mRequiredVersion.empty()) | 
| 90   { | 90   { | 
| 91     result.append(u"requiredVersion="_str); | 91     result.append(ABP_TEXT("requiredVersion="_str)); | 
| 92     result.append(mRequiredVersion); | 92     result.append(mRequiredVersion); | 
| 93     result.append(u'\n'); | 93     result.append(ABP_TEXT('\n')); | 
| 94   } | 94   } | 
| 95   if (mDownloadCount) | 95   if (mDownloadCount) | 
| 96   { | 96   { | 
| 97     result.append(u"downloadCount="_str); | 97     result.append(ABP_TEXT("downloadCount="_str)); | 
| 98     result.append(mDownloadCount); | 98     result.append(mDownloadCount); | 
| 99     result.append(u'\n'); | 99     result.append(ABP_TEXT('\n')); | 
| 100   } | 100   } | 
| 101   return result; | 101   return result; | 
| 102 } | 102 } | 
| OLD | NEW | 
|---|