OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/policy/url_blacklist_manager.h" | 5 #include "chrome/browser/policy/url_blacklist_manager.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
10 #include "base/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 348 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
349 blacklist_ = blacklist.Pass(); | 349 blacklist_ = blacklist.Pass(); |
350 } | 350 } |
351 | 351 |
352 bool URLBlacklistManager::IsURLBlocked(const GURL& url) const { | 352 bool URLBlacklistManager::IsURLBlocked(const GURL& url) const { |
353 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 353 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
354 return blacklist_->IsURLBlocked(url); | 354 return blacklist_->IsURLBlocked(url); |
355 } | 355 } |
356 | 356 |
357 // static | 357 // static |
358 void URLBlacklistManager::RegisterPrefs(PrefService* pref_service) { | 358 void URLBlacklistManager::RegisterUserPrefs(PrefServiceSyncable* pref_service) { |
359 pref_service->RegisterListPref(prefs::kUrlBlacklist, | 359 pref_service->RegisterListPref(prefs::kUrlBlacklist, |
360 PrefService::UNSYNCABLE_PREF); | 360 PrefServiceSyncable::UNSYNCABLE_PREF); |
361 pref_service->RegisterListPref(prefs::kUrlWhitelist, | 361 pref_service->RegisterListPref(prefs::kUrlWhitelist, |
362 PrefService::UNSYNCABLE_PREF); | 362 PrefServiceSyncable::UNSYNCABLE_PREF); |
363 } | 363 } |
364 | 364 |
365 } // namespace policy | 365 } // namespace policy |
OLD | NEW |