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

Side by Side Diff: ppapi/shared_impl/private/ppb_char_set_shared.cc

Issue 11734021: Roll ICU and convert include style to standard Chromium style, (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « ppapi/proxy/browser_font_resource_trusted.cc ('k') | printing/backend/print_backend.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ppapi/shared_impl/private/ppb_char_set_shared.h" 5 #include "ppapi/shared_impl/private/ppb_char_set_shared.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/i18n/icu_string_conversions.h" 9 #include "base/i18n/icu_string_conversions.h"
10 #include "ppapi/c/dev/ppb_memory_dev.h" 10 #include "ppapi/c/dev/ppb_memory_dev.h"
11 #include "ppapi/thunk/thunk.h" 11 #include "ppapi/thunk/thunk.h"
12 #include "unicode/ucnv.h" 12 #include "third_party/icu/public/common/unicode/ucnv.h"
13 #include "unicode/ucnv_cb.h" 13 #include "third_party/icu/public/common/unicode/ucnv_cb.h"
14 #include "unicode/ucnv_err.h" 14 #include "third_party/icu/public/common/unicode/ucnv_err.h"
15 #include "unicode/ustring.h" 15 #include "third_party/icu/public/common/unicode/ustring.h"
16 16
17 namespace ppapi { 17 namespace ppapi {
18 18
19 namespace { 19 namespace {
20 20
21 PP_CharSet_Trusted_ConversionError DeprecatedToConversionError( 21 PP_CharSet_Trusted_ConversionError DeprecatedToConversionError(
22 PP_CharSet_ConversionError on_error) { 22 PP_CharSet_ConversionError on_error) {
23 switch (on_error) { 23 switch (on_error) {
24 case PP_CHARSET_CONVERSIONERROR_SKIP: 24 case PP_CHARSET_CONVERSIONERROR_SKIP:
25 return PP_CHARSET_TRUSTED_CONVERSIONERROR_SKIP; 25 return PP_CHARSET_TRUSTED_CONVERSIONERROR_SKIP;
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 if (output_buffer) { 230 if (output_buffer) {
231 memcpy(output_buffer, output.c_str(), 231 memcpy(output_buffer, output.c_str(),
232 std::min(*output_utf16_length, static_cast<uint32_t>(output.size())) 232 std::min(*output_utf16_length, static_cast<uint32_t>(output.size()))
233 * sizeof(uint16_t)); 233 * sizeof(uint16_t));
234 } 234 }
235 *output_utf16_length = static_cast<uint32_t>(output.size()); 235 *output_utf16_length = static_cast<uint32_t>(output.size());
236 return PP_TRUE; 236 return PP_TRUE;
237 } 237 }
238 238
239 } // namespace ppapi 239 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/browser_font_resource_trusted.cc ('k') | printing/backend/print_backend.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698