From 8d090ca8c25795d526761bcae9fb301b51b2ee43 Mon Sep 17 00:00:00 2001 From: "idanan@chromium.org" Date: Wed, 15 Jul 2009 17:05:49 +0000 Subject: Privacy Blacklist IOImplemented parsing of input (text) blacklists. This is the format in which we will download privacy blacklist.Implemented storing and reading of aggregated blacklists in a binary format. This is the repository which Chromium will read on startup which is more efficient to load than the downloaded blacklists.Added concept of providers to blacklist entries so that we can determine the source of a pattern match, for future display in the UI.Unit tests added for the new IO classes. Privacy Blacklist conversion tool implemented to a single text blacklist into the binary format. Still needs options for storing multiple blacklists (TODO). BUG=none TEST=Blacklist* Review URL: http://codereview.chromium.org/155298 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20734 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/test/data/blacklist_small.pbl | 19 +++++++++++++++++++ chrome/test/data/blacklist_small.pbr | Bin 0 -> 262 bytes 2 files changed, 19 insertions(+) create mode 100644 chrome/test/data/blacklist_small.pbl create mode 100644 chrome/test/data/blacklist_small.pbr (limited to 'chrome/test/data') diff --git a/chrome/test/data/blacklist_small.pbl b/chrome/test/data/blacklist_small.pbl new file mode 100644 index 0000000..c753231 --- /dev/null +++ b/chrome/test/data/blacklist_small.pbl @@ -0,0 +1,19 @@ +[Chromium::PrivacyBlacklist] +|Name: Sample +|URL: http://www.google.com Text here is ignored +|Icon: Unsupported feature !!!!! + +# Default match attributes (matches everything) +@ => kBlockByType(application/x-shockwave-flash), kDontPersistCookies + +# Affect an entire site +@poor-security-site.com => kBlockUnsecure + +# Affect subdomains of an entire site +@.ad-serving-place.com => kDontSendCookies, kDontStoreCookies + +# Affect site files under a subfolder +www.site.com/anonymous/folder/@ => kDontSendUserAgent, kDontSendReferrer + +# Affect a specific URL +www.site.com/bad/url => kBlockAll diff --git a/chrome/test/data/blacklist_small.pbr b/chrome/test/data/blacklist_small.pbr new file mode 100644 index 0000000..c3f8571 Binary files /dev/null and b/chrome/test/data/blacklist_small.pbr differ -- cgit v1.1