| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/stl_util.h" | 8 #include "base/stl_util.h" |
| 9 #include "base/string_number_conversions.h" | 9 #include "base/string_number_conversions.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| 11 #include "chrome/browser/net/url_fixer_upper.h" | 11 #include "chrome/browser/net/url_fixer_upper.h" |
| 12 #include "chrome/browser/prefs/pref_service.h" | 12 #include "chrome/browser/prefs/pref_service.h" |
| 13 #include "chrome/common/chrome_notification_types.h" | 13 #include "chrome/common/chrome_notification_types.h" |
| 14 #include "chrome/common/pref_names.h" | 14 #include "chrome/common/pref_names.h" |
| 15 #include "content/public/browser/browser_thread.h" | 15 #include "content/public/browser/browser_thread.h" |
| 16 #include "content/public/browser/notification_details.h" | 16 #include "content/public/browser/notification_details.h" |
| 17 #include "content/public/browser/notification_source.h" | 17 #include "content/public/browser/notification_source.h" |
| 18 #include "googleurl/src/gurl.h" | 18 #include "googleurl/src/gurl.h" |
| 19 | 19 |
| 20 using content::BrowserThread; |
| 21 |
| 20 namespace policy { | 22 namespace policy { |
| 21 | 23 |
| 22 namespace { | 24 namespace { |
| 23 | 25 |
| 24 // Maximum filters per policy. Filters over this index are ignored. | 26 // Maximum filters per policy. Filters over this index are ignored. |
| 25 const size_t kMaxFiltersPerPolicy = 100; | 27 const size_t kMaxFiltersPerPolicy = 100; |
| 26 | 28 |
| 27 typedef std::vector<std::string> StringVector; | 29 typedef std::vector<std::string> StringVector; |
| 28 | 30 |
| 29 StringVector* ListValueToStringVector(const base::ListValue* list) { | 31 StringVector* ListValueToStringVector(const base::ListValue* list) { |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 | 406 |
| 405 // static | 407 // static |
| 406 void URLBlacklistManager::RegisterPrefs(PrefService* pref_service) { | 408 void URLBlacklistManager::RegisterPrefs(PrefService* pref_service) { |
| 407 pref_service->RegisterListPref(prefs::kUrlBlacklist, | 409 pref_service->RegisterListPref(prefs::kUrlBlacklist, |
| 408 PrefService::UNSYNCABLE_PREF); | 410 PrefService::UNSYNCABLE_PREF); |
| 409 pref_service->RegisterListPref(prefs::kUrlWhitelist, | 411 pref_service->RegisterListPref(prefs::kUrlWhitelist, |
| 410 PrefService::UNSYNCABLE_PREF); | 412 PrefService::UNSYNCABLE_PREF); |
| 411 } | 413 } |
| 412 | 414 |
| 413 } // namespace policy | 415 } // namespace policy |
| OLD | NEW |