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

Unified Diff: chrome/browser/managed_mode/managed_mode.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: Split navigated_urls in two and refactor. Created 8 years, 1 month 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.h
diff --git a/chrome/browser/managed_mode/managed_mode.h b/chrome/browser/managed_mode/managed_mode.h
index 3c4126d863b277a2b7294f548c9c89384e935d24..55c1cd8cd7cfb7eeff89ff39811edd589949f55e 100644
--- a/chrome/browser/managed_mode/managed_mode.h
+++ b/chrome/browser/managed_mode/managed_mode.h
@@ -26,6 +26,7 @@ class ManagedModeURLFilter;
class PrefChangeRegistrar;
class PrefService;
class Profile;
+
namespace policy{
class URLBlacklist;
}
@@ -70,15 +71,16 @@ class ManagedMode : public chrome::BrowserListObserver,
// Called in the critical path of drawing the history UI, so needs to be fast.
static void GetCategoryNames(CategoryList* list);
- // Returns the profile whitelist.
- static scoped_ptr<base::ListValue> GetWhitelist();
+ // Checks if the url pattern is in the manual whitelist.
+ static bool IsInManualWhitelist(const std::string& url_pattern);
- // Sets the profile whitelist to |whitelist|.
- static void SetWhitelist(base::ListValue* whitelist);
+ // Appends |whitelist| to the manual whitelist (both in URL filter and in
+ // preferences).
+ static void AddToManualWhitelist(const base::ListValue& whitelist);
- // Adds the |url| to the manual lists.
- static void AddStringToManualWhitelist(const std::string& url);
- static void AddStringToManualBlacklist(const std::string& url);
+ // Adds the |url_pattern| to the manual lists in the URL filter.
+ static void AddURLPatternToManualWhitelist(const std::string& url_pattern);
+ static void AddURLPatternToManualBlacklist(const std::string& url_pattern);
// Returns the profile blacklist.
static scoped_ptr<base::ListValue> GetBlacklist();
@@ -157,6 +159,13 @@ class ManagedMode : public chrome::BrowserListObserver,
void UpdateWhitelist();
+ // Returns a copy of the manual whitelist which is stored in each profile.
+ scoped_ptr<base::ListValue> GetWhitelist();
+
+ void AddToManualWhitelistImpl(const base::ListValue& whitelist);
+
+ bool IsInManualWhitelistImpl(const std::string& url_pattern);
+
content::NotificationRegistrar registrar_;
scoped_ptr<PrefChangeRegistrar> pref_change_registrar_;

Powered by Google App Engine
This is Rietveld 408576698