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

Unified Diff: compiled/subscription/DownloadableSubscription.h

Issue 29630576: Issue 5146 - Part 2: Process http response in C++ (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Created Dec. 5, 2017, 9:19 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
« no previous file with comments | « compiled/bindings/main.cpp ('k') | compiled/subscription/DownloadableSubscription.cpp » ('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
@@ -65,23 +65,31 @@
};
typedef intrusive_ptr<DownloadableSubscription> DownloadableSubscriptionPtr;
class DownloadableSubscription_Parser : public ref_counted
{
std::vector<OwnedString> mFiltersText;
OwnedStringMap<OwnedString> mParams;
- bool mFirstLine;
public:
DownloadableSubscription_Parser();
- void BINDINGS_EXPORTED Process(const String& line);
+ bool BINDINGS_EXPORTED Process(const String& buffer);
bool BINDINGS_EXPORTED VerifyChecksum();
// return the expiration interval.
int64_t BINDINGS_EXPORTED Finalize(DownloadableSubscription&);
const String& BINDINGS_EXPORTED GetRedirect() const;
const String& BINDINGS_EXPORTED GetHomepage() const;
+ const String& BINDINGS_EXPORTED GetError() const
+ {
+ return mError;
+ }
private:
MD5 mChecksum;
+ DependentString mError;
+ OwnedString mRequiredVersion;
OwnedString mB64Checksum;
static int64_t ParseExpires(const String& expires);
+ bool ProcessFirstLine(const String& line);
+ void ProcessLine(const String& line);
+ static bool GetNextLine(DependentString& buffer, DependentString& line);
};
« no previous file with comments | « compiled/bindings/main.cpp ('k') | compiled/subscription/DownloadableSubscription.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld