Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4846)

Unified Diff: chrome/browser/managed_mode/managed_mode_url_filter.h

Issue 11299035: Support manual (white|black)list, previewing and allowing after interstitial (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Minor changes Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/managed_mode/managed_mode_url_filter.h
diff --git a/chrome/browser/managed_mode/managed_mode_url_filter.h b/chrome/browser/managed_mode/managed_mode_url_filter.h
index 93adff91e34655e024d950e420149ad10d16065f..6537af93de86fb763b3591994c614ac380632487 100644
--- a/chrome/browser/managed_mode/managed_mode_url_filter.h
+++ b/chrome/browser/managed_mode/managed_mode_url_filter.h
@@ -13,6 +13,10 @@
#include "base/values.h"
#include "chrome/browser/managed_mode/managed_mode_site_list.h"
+namespace policy {
+class URLBlacklist;
+} // namespace policy
+
class FilePath;
class GURL;
@@ -56,6 +60,15 @@ class ManagedModeURLFilter : public base::NonThreadSafe {
void SetFromPatterns(const std::vector<std::string>& patterns,
const base::Closure& continuation);
+ // Sets the manual lists.
+ void SetManualLists(scoped_ptr<ListValue> whitelist,
+ scoped_ptr<ListValue> blacklist);
+
+ // Adds a pattern to a manual list. If |is_whitelist| is true it gets added
+ // to the whitelist, else to the blacklist.
+ void AddURLPatternToManualList(const bool is_whitelist,
+ const std::string& url_pattern);
+
private:
void SetContents(const base::Closure& callback,
scoped_ptr<Contents> url_matcher);
@@ -64,6 +77,12 @@ class ManagedModeURLFilter : public base::NonThreadSafe {
FilteringBehavior default_behavior_;
scoped_ptr<Contents> contents_;
+ // The |url_manual_list_allow_| blocks all URLs except the ones that are
+ // added while the |url_manual_list_block_| blocks only the URLs that are
+ // added to it.
+ scoped_ptr<policy::URLBlacklist> url_manual_list_allow_;
+ scoped_ptr<policy::URLBlacklist> url_manual_list_block_;
+
DISALLOW_COPY_AND_ASSIGN(ManagedModeURLFilter);
};
« no previous file with comments | « chrome/browser/managed_mode/managed_mode_resource_throttle.cc ('k') | chrome/browser/managed_mode/managed_mode_url_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698