Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(319)

Side by Side Diff: url_canon_icu.cc

Issue 2029803003: Update to Chromium //url at Chromium commit 79dc59ac7602413181079ecb463873e29a1d7d0a. (Closed) Base URL: https://chromium.googlesource.com/external/github.com/domokit/gurl@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « url_canon_host.cc ('k') | url_canon_internal.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // ICU integration functions. 5 // ICU integration functions.
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 // It also closely matches what IE 10 does except for the BiDi check ( 92 // It also closely matches what IE 10 does except for the BiDi check (
93 // http://goo.gl/3XBhqw ). 93 // http://goo.gl/3XBhqw ).
94 // See http://http://unicode.org/reports/tr46/ and references therein 94 // See http://http://unicode.org/reports/tr46/ and references therein
95 // for more details. 95 // for more details.
96 struct UIDNAWrapper { 96 struct UIDNAWrapper {
97 UIDNAWrapper() { 97 UIDNAWrapper() {
98 UErrorCode err = U_ZERO_ERROR; 98 UErrorCode err = U_ZERO_ERROR;
99 // TODO(jungshik): Change options as different parties (browsers, 99 // TODO(jungshik): Change options as different parties (browsers,
100 // registrars, search engines) converge toward a consensus. 100 // registrars, search engines) converge toward a consensus.
101 value = uidna_openUTS46(UIDNA_CHECK_BIDI, &err); 101 value = uidna_openUTS46(UIDNA_CHECK_BIDI, &err);
102 if (U_FAILURE(err)) 102 if (U_FAILURE(err)) {
103 CHECK(false) << "failed to open UTS46 data with error: " << err;
103 value = NULL; 104 value = NULL;
105 }
104 } 106 }
105 107
106 UIDNA* value; 108 UIDNA* value;
107 }; 109 };
108 110
109 } // namespace 111 } // namespace
110 112
111 ICUCharsetConverter::ICUCharsetConverter(UConverter* converter) 113 ICUCharsetConverter::ICUCharsetConverter(UConverter* converter)
112 : converter_(converter) { 114 : converter_(converter) {
113 } 115 }
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 // if necessary. 180 // if necessary.
179 if (err != U_BUFFER_OVERFLOW_ERROR || info.errors != 0) 181 if (err != U_BUFFER_OVERFLOW_ERROR || info.errors != 0)
180 return false; // Unknown error, give up. 182 return false; // Unknown error, give up.
181 183
182 // Not enough room in our buffer, expand. 184 // Not enough room in our buffer, expand.
183 output->Resize(output_length); 185 output->Resize(output_length);
184 } 186 }
185 } 187 }
186 188
187 } // namespace url 189 } // namespace url
OLDNEW
« no previous file with comments | « url_canon_host.cc ('k') | url_canon_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698