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

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: Changes according to comments. 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..97a7b5c1a13ea488d076c3a2247d74f36847ea6a 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,19 @@ 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);
+ bool IsInManualWhitelistImpl(const std::string& url_pattern);
Bernhard Bauer 2012/11/27 18:44:46 Make this private please.
Sergiu 2012/11/28 12:53:25 Done. I'm not sure about the order of the function
Bernhard Bauer 2012/11/28 14:21:05 You mean in the .cc file? In the .h file we don't
- // 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). Returns whether the last element in |whitelist| was already
+ // in the manual whitelist or not.
Bernhard Bauer 2012/11/27 18:44:46 That seems… very specific. Could a client just use
Sergiu 2012/11/28 12:53:25 I'm not sure I get you here, AddToManualWhitelist
Bernhard Bauer 2012/11/28 14:21:05 Yes, it's just that an interface "add these, and t
+ static bool AddToManualWhitelist(const base::ListValue& whitelist);
+ bool AddToManualWhitelistImpl(const base::ListValue& whitelist);
Bernhard Bauer 2012/11/27 18:44:46 Make this private.
Sergiu 2012/11/28 12:53:25 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_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 +162,9 @@ 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();
+
content::NotificationRegistrar registrar_;
scoped_ptr<PrefChangeRegistrar> pref_change_registrar_;

Powered by Google App Engine
This is Rietveld 408576698