| OLD | NEW |
| 1 // Copyright 2011, Google Inc. | 1 // Copyright 2011, Google Inc. |
| 2 // All rights reserved. | 2 // All rights reserved. |
| 3 // | 3 // |
| 4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
| 5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
| 6 // met: | 6 // met: |
| 7 // | 7 // |
| 8 // * Redistributions of source code must retain the above copyright | 8 // * Redistributions of source code must retain the above copyright |
| 9 // notice, this list of conditions and the following disclaimer. | 9 // notice, this list of conditions and the following disclaimer. |
| 10 // * Redistributions in binary form must reproduce the above | 10 // * Redistributions in binary form must reproduce the above |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 | 29 |
| 30 // ICU integration functions. | 30 // ICU integration functions. |
| 31 | 31 |
| 32 #include <stdlib.h> | 32 #include <stdlib.h> |
| 33 #include <string.h> | 33 #include <string.h> |
| 34 #include <unicode/ucnv.h> | 34 #include <unicode/ucnv.h> |
| 35 #include <unicode/ucnv_cb.h> | 35 #include <unicode/ucnv_cb.h> |
| 36 #include <unicode/uidna.h> | 36 #include <unicode/uidna.h> |
| 37 | 37 |
| 38 #include "googleurl/src/url_canon_icu.h" | |
| 39 #include "googleurl/src/url_canon_internal.h" // for _itoa_s | |
| 40 | |
| 41 #include "base/logging.h" | 38 #include "base/logging.h" |
| 39 #include "url/url_canon_icu.h" |
| 40 #include "url/url_canon_internal.h" // for _itoa_s |
| 42 | 41 |
| 43 namespace url_canon { | 42 namespace url_canon { |
| 44 | 43 |
| 45 namespace { | 44 namespace { |
| 46 | 45 |
| 47 // Called when converting a character that can not be represented, this will | 46 // Called when converting a character that can not be represented, this will |
| 48 // append an escaped version of the numerical character reference for that code | 47 // append an escaped version of the numerical character reference for that code |
| 49 // point. It is of the form "Ӓ" and we will escape the non-digits to | 48 // point. It is of the form "Ӓ" and we will escape the non-digits to |
| 50 // "%26%231234%3B". Why? This is what Netscape did back in the olden days. | 49 // "%26%231234%3B". Why? This is what Netscape did back in the olden days. |
| 51 void appendURLEscapedChar(const void* context, | 50 void appendURLEscapedChar(const void* context, |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 | 200 |
| 202 if (U_IS_UNICODE_CHAR(*code_point)) | 201 if (U_IS_UNICODE_CHAR(*code_point)) |
| 203 return true; | 202 return true; |
| 204 | 203 |
| 205 // Invalid code point. | 204 // Invalid code point. |
| 206 *code_point = kUnicodeReplacementCharacter; | 205 *code_point = kUnicodeReplacementCharacter; |
| 207 return false; | 206 return false; |
| 208 } | 207 } |
| 209 | 208 |
| 210 } // namespace url_canon | 209 } // namespace url_canon |
| OLD | NEW |