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 // Functions for canonicalizing "filesystem:file:" URLs. | 5 // Functions for canonicalizing "filesystem:file:" URLs. |
6 | 6 |
| 7 #include "base/strings/string16.h" |
| 8 #include "url/third_party/mozilla/url_parse.h" |
7 #include "url/url_canon.h" | 9 #include "url/url_canon.h" |
8 #include "url/url_canon_internal.h" | 10 #include "url/url_canon_internal.h" |
9 #include "url/url_file.h" | 11 #include "url/url_constants.h" |
10 #include "url/url_parse_internal.h" | |
11 #include "url/url_util.h" | 12 #include "url/url_util.h" |
12 #include "url/url_util_internal.h" | 13 #include "url/url_util_internal.h" |
13 | 14 |
14 namespace url { | 15 namespace url { |
15 | 16 |
16 namespace { | 17 namespace { |
17 | 18 |
18 // We use the URLComponentSource for the outer URL, as it can have replacements, | 19 // We use the URLComponentSource for the outer URL, as it can have replacements, |
19 // whereas the inner_url can't, so it uses spec. | 20 // whereas the inner_url can't, so it uses spec. |
20 template<typename CHAR, typename UCHAR> | 21 template<typename CHAR, typename UCHAR> |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 Parsed* new_parsed) { | 121 Parsed* new_parsed) { |
121 RawCanonOutput<1024> utf8; | 122 RawCanonOutput<1024> utf8; |
122 URLComponentSource<char> source(base); | 123 URLComponentSource<char> source(base); |
123 Parsed parsed(base_parsed); | 124 Parsed parsed(base_parsed); |
124 SetupUTF16OverrideComponents(base, replacements, &utf8, &source, &parsed); | 125 SetupUTF16OverrideComponents(base, replacements, &utf8, &source, &parsed); |
125 return DoCanonicalizeFileSystemURL<char, unsigned char>( | 126 return DoCanonicalizeFileSystemURL<char, unsigned char>( |
126 base, source, parsed, charset_converter, output, new_parsed); | 127 base, source, parsed, charset_converter, output, new_parsed); |
127 } | 128 } |
128 | 129 |
129 } // namespace url | 130 } // namespace url |
OLD | NEW |