| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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/safe_browsing_db/util.h" | 5 #include "components/safe_browsing_db/util.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/trace_event/trace_event.h" | 10 #include "base/trace_event/trace_event.h" |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 *list = kExtensionBlacklist; | 127 *list = kExtensionBlacklist; |
| 128 break; | 128 break; |
| 129 case IPBLACKLIST: | 129 case IPBLACKLIST: |
| 130 *list = kIPBlacklist; | 130 *list = kIPBlacklist; |
| 131 break; | 131 break; |
| 132 case UNWANTEDURL: | 132 case UNWANTEDURL: |
| 133 *list = kUnwantedUrlList; | 133 *list = kUnwantedUrlList; |
| 134 break; | 134 break; |
| 135 case MODULEWHITELIST: | 135 case MODULEWHITELIST: |
| 136 *list = kModuleWhitelist; | 136 *list = kModuleWhitelist; |
| 137 break; |
| 137 case RESOURCEBLACKLIST: | 138 case RESOURCEBLACKLIST: |
| 138 *list = kResourceBlacklist; | 139 *list = kResourceBlacklist; |
| 139 break; | 140 break; |
| 140 default: | 141 default: |
| 141 return false; | 142 return false; |
| 142 } | 143 } |
| 143 DCHECK(IsKnownList(*list)); | 144 DCHECK(IsKnownList(*list)); |
| 144 return true; | 145 return true; |
| 145 } | 146 } |
| 146 | 147 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 // that ends in '/' we also add the path without the slash. | 198 // that ends in '/' we also add the path without the slash. |
| 198 if (include_whitelist_hashes && path.size() > 1 && path.back() == '/') { | 199 if (include_whitelist_hashes && path.size() > 1 && path.back() == '/') { |
| 199 full_hashes->push_back(SBFullHashForString( | 200 full_hashes->push_back(SBFullHashForString( |
| 200 host + path.substr(0, path.size() - 1))); | 201 host + path.substr(0, path.size() - 1))); |
| 201 } | 202 } |
| 202 } | 203 } |
| 203 } | 204 } |
| 204 } | 205 } |
| 205 | 206 |
| 206 } // namespace safe_browsing | 207 } // namespace safe_browsing |
| OLD | NEW |