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

Unified Diff: chrome/browser/policy/url_blacklist_manager.h

Issue 7941008: Cosmetic cleanups in chrome/browser/policy/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Upload was broken? Created 9 years, 3 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/policy/url_blacklist_manager.h
diff --git a/chrome/browser/policy/url_blacklist_manager.h b/chrome/browser/policy/url_blacklist_manager.h
index 1717b20ae9140a7037e43d77e1e0ae679e7489cc..aa4553f0ba56c540412349b7677740d7e0946b51 100644
--- a/chrome/browser/policy/url_blacklist_manager.h
+++ b/chrome/browser/policy/url_blacklist_manager.h
@@ -23,16 +23,21 @@ class NotificationDetails;
class NotificationSource;
class PrefService;
-namespace base {
-class ListValue;
-}
-
namespace policy {
// Contains a set of filters to block and allow certain URLs, and matches GURLs
// against this set. The filters are currently kept in memory.
class URLBlacklist {
public:
+ // A constant mapped to a scheme that can be filtered.
+ enum SchemeFlag {
+ SCHEME_HTTP = 1 << 0,
+ SCHEME_HTTPS = 1 << 1,
+ SCHEME_FTP = 1 << 2,
+
+ SCHEME_ALL = (1 << 3) - 1,
+ };
+
URLBlacklist();
virtual ~URLBlacklist();
@@ -46,15 +51,6 @@ class URLBlacklist {
// Returns true if the URL is blocked.
bool IsURLBlocked(const GURL& url) const;
- // A constant mapped to a scheme that can be filtered.
- enum SchemeFlag {
- SCHEME_HTTP = 1 << 0,
- SCHEME_HTTPS = 1 << 1,
- SCHEME_FTP = 1 << 2,
-
- SCHEME_ALL = (1 << 3) - 1,
- };
-
// Returns true if |scheme| is a scheme that can be filtered. Returns true
// and sets |flag| to SCHEME_ALL if |scheme| is empty.
static bool SchemeToFlag(const std::string& scheme, SchemeFlag* flag);
@@ -71,8 +67,6 @@ class URLBlacklist {
uint16* port,
std::string* path);
private:
- void AddFilter(const std::string& filter, bool block);
-
struct PathFilter {
explicit PathFilter(const std::string& path, uint16 port, bool match)
: path_prefix(path),
@@ -91,6 +85,8 @@ class URLBlacklist {
typedef std::vector<PathFilter> PathFilterList;
typedef base::hash_map<std::string, PathFilterList*> HostFilterTable;
+ void AddFilter(const std::string& filter, bool block);
+
HostFilterTable host_filters_;
DISALLOW_COPY_AND_ASSIGN(URLBlacklist);
« no previous file with comments | « chrome/browser/policy/testing_policy_url_fetcher_factory.cc ('k') | chrome/browser/policy/url_blacklist_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698