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_canon_internal.h" | 5 #include "url/url_canon_internal.h" |
6 | 6 |
7 #include <errno.h> | 7 #include <errno.h> |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdlib.h> | |
10 | |
11 #include <cstdio> | 9 #include <cstdio> |
12 #include <string> | |
13 | 10 |
14 #include "base/strings/utf_string_conversion_utils.h" | 11 #include "base/strings/utf_string_conversion_utils.h" |
| 12 #include "url/third_party/mozilla/url_parse.h" |
15 | 13 |
16 namespace url { | 14 namespace url { |
17 | 15 |
18 namespace { | 16 namespace { |
19 | 17 |
20 template<typename CHAR, typename UCHAR> | 18 template<typename CHAR, typename UCHAR> |
21 void DoAppendStringOfType(const CHAR* source, int length, | 19 void DoAppendStringOfType(const CHAR* source, int length, |
22 SharedCharTypes type, | 20 SharedCharTypes type, |
23 CanonOutput* output) { | 21 CanonOutput* output) { |
24 for (int i = 0; i < length; i++) { | 22 for (int i = 0; i < length; i++) { |
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
424 for (int i = 0; i < written; ++i) { | 422 for (int i = 0; i < written; ++i) { |
425 buffer[i] = static_cast<base::char16>(temp[i]); | 423 buffer[i] = static_cast<base::char16>(temp[i]); |
426 } | 424 } |
427 buffer[written] = '\0'; | 425 buffer[written] = '\0'; |
428 return 0; | 426 return 0; |
429 } | 427 } |
430 | 428 |
431 #endif // !WIN32 | 429 #endif // !WIN32 |
432 | 430 |
433 } // namespace url | 431 } // namespace url |
OLD | NEW |