| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 | 58 |
| 59 scoped_ptr<URLBlacklist> blacklist(new URLBlacklist); | 59 scoped_ptr<URLBlacklist> blacklist(new URLBlacklist); |
| 60 blacklist->Block(block.get()); | 60 blacklist->Block(block.get()); |
| 61 blacklist->Allow(allow.get()); | 61 blacklist->Allow(allow.get()); |
| 62 return blacklist.Pass(); | 62 return blacklist.Pass(); |
| 63 } | 63 } |
| 64 | 64 |
| 65 } // namespace | 65 } // namespace |
| 66 | 66 |
| 67 struct URLBlacklist::FilterComponents { | 67 struct URLBlacklist::FilterComponents { |
| 68 FilterComponents() : match_subdomains(true), allow(true) {} | 68 FilterComponents() : port(0), match_subdomains(true), allow(true) {} |
| 69 ~FilterComponents() {} | 69 ~FilterComponents() {} |
| 70 | 70 |
| 71 std::string scheme; | 71 std::string scheme; |
| 72 std::string host; | 72 std::string host; |
| 73 uint16 port; | 73 uint16 port; |
| 74 std::string path; | 74 std::string path; |
| 75 bool match_subdomains; | 75 bool match_subdomains; |
| 76 bool allow; | 76 bool allow; |
| 77 }; | 77 }; |
| 78 | 78 |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 | 367 |
| 368 // static | 368 // static |
| 369 void URLBlacklistManager::RegisterPrefs(PrefService* pref_service) { | 369 void URLBlacklistManager::RegisterPrefs(PrefService* pref_service) { |
| 370 pref_service->RegisterListPref(prefs::kUrlBlacklist, | 370 pref_service->RegisterListPref(prefs::kUrlBlacklist, |
| 371 PrefService::UNSYNCABLE_PREF); | 371 PrefService::UNSYNCABLE_PREF); |
| 372 pref_service->RegisterListPref(prefs::kUrlWhitelist, | 372 pref_service->RegisterListPref(prefs::kUrlWhitelist, |
| 373 PrefService::UNSYNCABLE_PREF); | 373 PrefService::UNSYNCABLE_PREF); |
| 374 } | 374 } |
| 375 | 375 |
| 376 } // namespace policy | 376 } // namespace policy |
| OLD | NEW |