OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "url/url_util.h" | 5 #include "url/url_util.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <string.h> | 8 #include <string.h> |
| 9 #include <ostream> |
9 #include <vector> | 10 #include <vector> |
10 | 11 |
11 #include "base/debug/leak_annotations.h" | 12 #include "base/debug/leak_annotations.h" |
12 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "base/strings/string_piece.h" |
13 #include "base/strings/string_util.h" | 15 #include "base/strings/string_util.h" |
| 16 #include "url/third_party/mozilla/url_parse.h" |
14 #include "url/url_canon_internal.h" | 17 #include "url/url_canon_internal.h" |
15 #include "url/url_file.h" | 18 #include "url/url_constants.h" |
16 #include "url/url_util_internal.h" | 19 #include "url/url_file.h" // IWYU pragma: keep |
| 20 #include "url/url_parse_internal.h" |
17 | 21 |
18 namespace url { | 22 namespace url { |
19 | 23 |
20 namespace { | 24 namespace { |
21 | 25 |
22 const int kNumStandardURLSchemes = 8; | 26 const int kNumStandardURLSchemes = 8; |
23 const SchemeWithType kStandardURLSchemes[kNumStandardURLSchemes] = { | 27 const SchemeWithType kStandardURLSchemes[kNumStandardURLSchemes] = { |
24 {kHttpScheme, SCHEME_WITH_PORT}, | 28 {kHttpScheme, SCHEME_WITH_PORT}, |
25 {kHttpsScheme, SCHEME_WITH_PORT}, | 29 {kHttpsScheme, SCHEME_WITH_PORT}, |
26 // Yes, file URLs can have a hostname, so file URLs should be handled as | 30 // Yes, file URLs can have a hostname, so file URLs should be handled as |
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
575 return DoCompareSchemeComponent(spec, component, compare_to); | 579 return DoCompareSchemeComponent(spec, component, compare_to); |
576 } | 580 } |
577 | 581 |
578 bool CompareSchemeComponent(const base::char16* spec, | 582 bool CompareSchemeComponent(const base::char16* spec, |
579 const Component& component, | 583 const Component& component, |
580 const char* compare_to) { | 584 const char* compare_to) { |
581 return DoCompareSchemeComponent(spec, component, compare_to); | 585 return DoCompareSchemeComponent(spec, component, compare_to); |
582 } | 586 } |
583 | 587 |
584 } // namespace url | 588 } // namespace url |
OLD | NEW |