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

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: Allow/block flow which includes preview mode. 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..40e46ad6ce26392d40584eb3144775cdb0b8e42b 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
Bernhard Bauer 2012/11/26 16:06:30 Nit: space before opening parenthesis.
Sergiu 2012/11/27 15:37:34 Done.
+ // preferences).
+ static bool AddToManualWhitelist(const base::ListValue& whitelist);
Bernhard Bauer 2012/11/26 16:06:30 What does the return value mean?
Sergiu 2012/11/27 15:37:34 Done.
- // Adds the |url| to the manual lists.
- static void AddStringToManualWhitelist(const std::string& url);
- static void AddStringToManualBlacklist(const std::string& url);
+ // Adds the |url_patter| to the manual lists in the URL filter.
Bernhard Bauer 2012/11/26 16:06:30 Nit: |url_pattern|
Sergiu 2012/11/27 15:37:34 Done.
+ 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();
Bernhard Bauer 2012/11/26 16:06:30 Is this method used?
Sergiu 2012/11/27 15:37:34 Not right now but it will almost surely be used in
Bernhard Bauer 2012/11/27 18:44:46 It's fine if you move it together with GetWhiteLis
@@ -157,6 +159,10 @@ class ManagedMode : public chrome::BrowserListObserver,
void UpdateWhitelist();
+ // Returns a copy of the manual whitelist which is stored in each profile.
+ static scoped_ptr<base::ListValue> GetWhitelist();
Bernhard Bauer 2012/11/26 16:06:30 If this method is private, we don't need a separat
Sergiu 2012/11/27 15:37:34 Yes, it is by ManagedMode::UpdateWhitelist. Initia
+ scoped_ptr<base::ListValue> GetWhitelistImpl();
+
content::NotificationRegistrar registrar_;
scoped_ptr<PrefChangeRegistrar> pref_change_registrar_;

Powered by Google App Engine
This is Rietveld 408576698