| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "components/policy/core/browser/url_blacklist_manager.h" | 5 #include "components/policy/core/browser/url_blacklist_manager.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/location.h" | 9 #include "base/location.h" |
| 10 #include "base/message_loop/message_loop_proxy.h" | 10 #include "base/message_loop/message_loop_proxy.h" |
| (...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 503 if (override_blacklist_.Run(request.url(), &block, reason)) | 503 if (override_blacklist_.Run(request.url(), &block, reason)) |
| 504 return block; | 504 return block; |
| 505 | 505 |
| 506 *reason = net::ERR_BLOCKED_BY_ADMINISTRATOR; | 506 *reason = net::ERR_BLOCKED_BY_ADMINISTRATOR; |
| 507 return IsURLBlocked(request.url()); | 507 return IsURLBlocked(request.url()); |
| 508 } | 508 } |
| 509 | 509 |
| 510 // static | 510 // static |
| 511 void URLBlacklistManager::RegisterProfilePrefs( | 511 void URLBlacklistManager::RegisterProfilePrefs( |
| 512 user_prefs::PrefRegistrySyncable* registry) { | 512 user_prefs::PrefRegistrySyncable* registry) { |
| 513 registry->RegisterListPref(policy_prefs::kUrlBlacklist, | 513 registry->RegisterListPref(policy_prefs::kUrlBlacklist); |
| 514 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 514 registry->RegisterListPref(policy_prefs::kUrlWhitelist); |
| 515 registry->RegisterListPref(policy_prefs::kUrlWhitelist, | |
| 516 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | |
| 517 } | 515 } |
| 518 | 516 |
| 519 } // namespace policy | 517 } // namespace policy |
| OLD | NEW |