| 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; |
| }; |
| } |