| Index: chrome/browser/managed_mode/managed_mode_url_filter.cc
|
| diff --git a/chrome/browser/managed_mode/managed_mode_url_filter.cc b/chrome/browser/managed_mode/managed_mode_url_filter.cc
|
| index 32ca664e800cf47a06d68e9995b51a64f4d77641..2b96b63a9933d8df4262c8b382e89f53ed44aedf 100644
|
| --- a/chrome/browser/managed_mode/managed_mode_url_filter.cc
|
| +++ b/chrome/browser/managed_mode/managed_mode_url_filter.cc
|
| @@ -191,6 +191,7 @@ ManagedModeURLFilter::GetFilteringBehaviorForURL(const GURL& url) const {
|
| return ALLOW;
|
| #endif
|
|
|
| + // TODO(sergiu): Find a less confusing way to do this.
|
| if (!url_manual_list_allow_.IsURLBlocked(url)) {
|
| if (url_manual_list_block_.IsURLBlocked(url))
|
| return BLOCK;
|
| @@ -279,7 +280,6 @@ void ManagedModeURLFilter::SetManualLists(scoped_ptr<ListValue> whitelist,
|
| url_manual_list_block_.Block(blacklist.get());
|
| ListValue all_sites;
|
| all_sites.Append(new base::StringValue("*"));
|
| - //XXX should do BlockingPool stuff here as well?
|
| url_manual_list_allow_.Allow(whitelist.get());
|
| url_manual_list_allow_.Block(&all_sites);
|
|
|
| @@ -302,21 +302,23 @@ void ManagedModeURLFilter::SetManualLists(scoped_ptr<ListValue> whitelist,
|
| continuation.Run();
|
| }
|
|
|
| -void ManagedModeURLFilter::AddStringToManualBlacklist(const std::string& url,
|
| +void ManagedModeURLFilter::AddURLPatternToManualBlacklist(
|
| + const std::string& url,
|
| const base::Closure& continuation) {
|
| DCHECK(CalledOnValidThread());
|
| - ListValue bl;
|
| - bl.AppendString(url);
|
| - url_manual_list_block_.Block(&bl);
|
| + ListValue blacklist;
|
| + blacklist.AppendString(url);
|
| + url_manual_list_block_.Block(&blacklist);
|
| }
|
|
|
| -void ManagedModeURLFilter::AddStringToManualWhitelist(const std::string& url,
|
| +void ManagedModeURLFilter::AddURLPatternToManualWhitelist(
|
| + const std::string& url,
|
| const base::Closure& continuation) {
|
| DCHECK(CalledOnValidThread());
|
|
|
| - ListValue bl;
|
| - bl.AppendString(url);
|
| - url_manual_list_allow_.Allow(&bl);
|
| + ListValue whitelist;
|
| + whitelist.AppendString(url);
|
| + url_manual_list_allow_.Allow(&whitelist);
|
| }
|
|
|
| void ManagedModeURLFilter::SetContents(const base::Closure& continuation,
|
|
|