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

Issue 1259673002: Make UTF16ToASCII and UTF16TOUTF8 take a StringPiece (Closed)

Created:
5 years, 5 months ago by brettw
Modified:
5 years, 5 months ago
Reviewers:
sky
CC:
chromium-reviews, tzik, posciak+watch_chromium.org, avayvod+watch_chromium.org, nasko+codewatch_chromium.org, browser-components-watch_chromium.org, dcheng, dmazzoni+watch_chromium.org, kinuko+watch, mlamouri+watch-media_chromium.org, jsbell+serviceworker_chromium.org, aboxhall+watch_chromium.org, jam, je_julie, darin-cc_chromium.org, jkarlin+watch_chromium.org, erikwright+watch_chromium.org, blink-worker-reviews_chromium.org, mlamouri+watch-content_chromium.org, creis+watch_chromium.org, mlamouri+watch-notifications_chromium.org, yuzo+watch_chromium.org, feature-media-reviews_chromium.org, nhiroki, horo+watch_chromium.org, rouslan+autofillwatch_chromium.org, michaeln, plundblad+watch_chromium.org, serviceworker-reviews, nektar+watch_chromium.org, mcasas+watch_chromium.org, kinuko+serviceworker, dtseng+watch_chromium.org, mkwst+moarreviews-renderer_chromium.org, estade+watch_chromium.org, peter+watch_chromium.org, wjia+watch_chromium.org, jshin+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make UTF16ToASCII and UTF16TOUTF8 take a StringPiece This is for consistency with the other UTF APIs. This is annoying in some cases because a WebString can be converted implicitly to a string16, but not a StringPiece, necessitating explicit conversions when this is done. And we can't have both versions because they're ambiguous. But this change will allow greater use of StringPieces without copying. The parameters to the UTF converters that take StringPieces were converted to by-value given the current guidance in StringPiece. The main non-search-and-replace change is in aw_render_view_ext.cc which saves two string copies. NOPRESUBMIT=true (due to legacy wstrings) Committed: https://crrev.com/717861b6a965ac33e8f88c93ea66e10dfa5c798f Cr-Commit-Position: refs/heads/master@{#340306}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+200 lines, -137 lines) Patch
M android_webview/renderer/aw_content_renderer_client.cc View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M android_webview/renderer/aw_render_view_ext.cc View 1 2 3 1 chunk +2 lines, -3 lines 0 comments Download
M base/strings/utf_string_conversions.h View 2 chunks +5 lines, -5 lines 0 comments Download
M base/strings/utf_string_conversions.cc View 1 5 chunks +14 lines, -8 lines 0 comments Download
M components/autofill/content/renderer/form_cache.cc View 1 chunk +2 lines, -1 line 0 comments Download
M components/html_viewer/web_mime_registry_impl.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M content/child/browser_font_resource_trusted.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M content/child/notifications/notification_data_conversions.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M content/child/notifications/notification_manager.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/child/simple_webmimeregistry_impl.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M content/renderer/accessibility/blink_ax_tree_source.cc View 9 chunks +57 lines, -36 lines 0 comments Download
M content/renderer/cache_storage/cache_storage_dispatcher.cc View 2 chunks +6 lines, -4 lines 0 comments Download
M content/renderer/clipboard_utils.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M content/renderer/media/android/webmediaplayer_android.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M content/renderer/media/media_stream_renderer_factory_impl.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M content/renderer/media/mock_web_rtc_peer_connection_handler_client.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M content/renderer/media/peer_connection_tracker.cc View 3 chunks +8 lines, -6 lines 0 comments Download
M content/renderer/media/rtc_data_channel_handler.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/media/rtc_dtmf_sender_handler.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/media/rtc_peer_connection_handler.cc View 6 chunks +17 lines, -12 lines 0 comments Download
M content/renderer/npapi/webplugin_impl.cc View 2 chunks +3 lines, -2 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 4 chunks +19 lines, -14 lines 0 comments Download
M content/renderer/render_view_browsertest.cc View 1 2 5 chunks +10 lines, -8 lines 0 comments Download
M content/renderer/render_view_impl.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/renderer_blink_platform_impl.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M content/renderer/renderer_webcookiejar_impl.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/service_worker/service_worker_context_client.cc View 2 chunks +4 lines, -3 lines 0 comments Download
M content/renderer/service_worker/service_worker_type_util.cc View 1 chunk +4 lines, -2 lines 0 comments Download
M content/renderer/speech_recognition_dispatcher.cc View 1 chunk +2 lines, -1 line 0 comments Download
M media/blink/encrypted_media_player_support.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M media/blink/key_system_config_selector.cc View 3 chunks +8 lines, -4 lines 0 comments Download
M media/blink/webcontentdecryptionmodulesession_impl.cc View 1 chunk +2 lines, -1 line 0 comments Download
M media/blink/webencryptedmediaclient_impl.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 27 (12 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1259673002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1259673002/1
5 years, 5 months ago (2015-07-24 15:39:30 UTC) #2
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: android_clang_dbg_recipe on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/android_clang_dbg_recipe/builds/100796)
5 years, 5 months ago (2015-07-24 15:44:14 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1259673002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1259673002/20001
5 years, 5 months ago (2015-07-24 16:07:30 UTC) #6
brettw
This is a trivial change in base and then copy-and-paste "base::StringPiece16(...)" around where the compiler ...
5 years, 5 months ago (2015-07-24 16:08:16 UTC) #8
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_clobber_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_clobber_rel_ng/builds/49841)
5 years, 5 months ago (2015-07-24 16:12:25 UTC) #10
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1259673002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1259673002/40001
5 years, 5 months ago (2015-07-24 17:09:36 UTC) #12
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_arm_compile on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_arm_compile/builds/25183)
5 years, 5 months ago (2015-07-24 17:14:30 UTC) #14
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1259673002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1259673002/60001
5 years, 5 months ago (2015-07-24 17:35:44 UTC) #16
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/81895)
5 years, 5 months ago (2015-07-24 17:45:20 UTC) #18
sky
LGTM
5 years, 5 months ago (2015-07-24 18:20:50 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1259673002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1259673002/60001
5 years, 5 months ago (2015-07-24 18:27:57 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/81917)
5 years, 5 months ago (2015-07-24 18:38:48 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1259673002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1259673002/60001
5 years, 5 months ago (2015-07-24 18:43:16 UTC) #25
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 5 months ago (2015-07-24 19:09:18 UTC) #26
commit-bot: I haz the power
5 years, 5 months ago (2015-07-24 19:10:16 UTC) #27
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/717861b6a965ac33e8f88c93ea66e10dfa5c798f
Cr-Commit-Position: refs/heads/master@{#340306}

Powered by Google App Engine
This is Rietveld 408576698