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

Unified Diff: include/AdblockPlus/ReferrerMapping.h

Issue 5768603836088320: Issue 1564-Fix FilterEngine::Matches for allowing request which is whitelisted in the ascendant node
Patch Set: revert and change referrer map Created Nov. 25, 2014, 12:22 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 | « no previous file | src/ReferrerMapping.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/AdblockPlus/ReferrerMapping.h
===================================================================
--- a/include/AdblockPlus/ReferrerMapping.h
+++ b/include/AdblockPlus/ReferrerMapping.h
@@ -22,6 +22,7 @@
#include <map>
#include <string>
#include <vector>
+#include "FilterEngine.h"
namespace AdblockPlus
{
@@ -46,8 +47,10 @@
* Records the refferer for a URL.
* @param url Request URL.
* @param referrer Request referrer.
+ * @param requestType Request type.
*/
- void Add(const std::string& url, const std::string& referrer);
+ void Add(const std::string& url, const std::string& referrer,
+ FilterEngine::ContentType requestType);
/**
* Builds a chain of referrers for the supplied URL.
@@ -59,7 +62,16 @@
private:
const int maxCachedUrls;
- std::map<std::string, std::string> mapping;
+ struct RequestInfo
+ {
+ RequestInfo(const std::string& referrerArg, FilterEngine::ContentType typeArg)
+ : referrer(referrerArg) , type(typeArg)
+ {
+ }
+ std::string referrer;
+ FilterEngine::ContentType type;
+ };
+ std::map</*url*/std::string, RequestInfo> mapping;
std::list<std::string> cachedUrls;
};
}
« no previous file with comments | « no previous file | src/ReferrerMapping.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld