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: Rebased Created Aug. 14, 2018, 12:45 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/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
@@ -67,21 +67,29 @@
};
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);
// 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:
+ DependentString mError;
+ OwnedString mRequiredVersion;
static int64_t ParseExpires(const String& expires);
+ bool ProcessFirstLine(const String& line);
+ void ProcessLine(const String& line);
+ static bool GetNextLine(DependentString& buffer, DependentString& line);
};
ABP_NS_END
« 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