| 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 "mailto:" URLs. | 5 // Functions for canonicalizing "mailto:" URLs. |
| 6 | 6 |
| 7 #include <stddef.h> |
| 8 |
| 9 #include "base/strings/string16.h" |
| 10 #include "url/third_party/mozilla/url_parse.h" |
| 7 #include "url/url_canon.h" | 11 #include "url/url_canon.h" |
| 8 #include "url/url_canon_internal.h" | 12 #include "url/url_canon_internal.h" |
| 9 #include "url/url_file.h" | |
| 10 #include "url/url_parse_internal.h" | |
| 11 | 13 |
| 12 namespace url { | 14 namespace url { |
| 13 | 15 |
| 14 namespace { | 16 namespace { |
| 15 | 17 |
| 16 template <typename CHAR, typename UCHAR> | 18 template <typename CHAR, typename UCHAR> |
| 17 bool DoCanonicalizeMailtoURL(const URLComponentSource<CHAR>& source, | 19 bool DoCanonicalizeMailtoURL(const URLComponentSource<CHAR>& source, |
| 18 const Parsed& parsed, | 20 const Parsed& parsed, |
| 19 CanonOutput* output, | 21 CanonOutput* output, |
| 20 Parsed* new_parsed) { | 22 Parsed* new_parsed) { |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 Parsed* new_parsed) { | 103 Parsed* new_parsed) { |
| 102 RawCanonOutput<1024> utf8; | 104 RawCanonOutput<1024> utf8; |
| 103 URLComponentSource<char> source(base); | 105 URLComponentSource<char> source(base); |
| 104 Parsed parsed(base_parsed); | 106 Parsed parsed(base_parsed); |
| 105 SetupUTF16OverrideComponents(base, replacements, &utf8, &source, &parsed); | 107 SetupUTF16OverrideComponents(base, replacements, &utf8, &source, &parsed); |
| 106 return DoCanonicalizeMailtoURL<char, unsigned char>( | 108 return DoCanonicalizeMailtoURL<char, unsigned char>( |
| 107 source, parsed, output, new_parsed); | 109 source, parsed, output, new_parsed); |
| 108 } | 110 } |
| 109 | 111 |
| 110 } // namespace url | 112 } // namespace url |
| OLD | NEW |