| 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" |
| 11 #include "components/safe_browsing_db/v4_protocol_manager_util.h" | |
| 12 #include "crypto/sha2.h" | 11 #include "crypto/sha2.h" |
| 13 #include "net/base/escape.h" | 12 #include "net/base/escape.h" |
| 14 #include "url/gurl.h" | 13 #include "url/gurl.h" |
| 15 | 14 |
| 16 namespace safe_browsing { | 15 namespace safe_browsing { |
| 17 | 16 |
| 18 // Utility functions ----------------------------------------------------------- | 17 // Utility functions ----------------------------------------------------------- |
| 19 | 18 |
| 20 namespace { | 19 namespace { |
| 21 | 20 |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 // that ends in '/' we also add the path without the slash. | 197 // that ends in '/' we also add the path without the slash. |
| 199 if (include_whitelist_hashes && path.size() > 1 && path.back() == '/') { | 198 if (include_whitelist_hashes && path.size() > 1 && path.back() == '/') { |
| 200 full_hashes->push_back(SBFullHashForString( | 199 full_hashes->push_back(SBFullHashForString( |
| 201 host + path.substr(0, path.size() - 1))); | 200 host + path.substr(0, path.size() - 1))); |
| 202 } | 201 } |
| 203 } | 202 } |
| 204 } | 203 } |
| 205 } | 204 } |
| 206 | 205 |
| 207 } // namespace safe_browsing | 206 } // namespace safe_browsing |
| OLD | NEW |