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

Issue 1280473002: Update ToLower/UpperASCII API (Closed)

Created:
5 years, 4 months ago by brettw
Modified:
5 years, 4 months ago
Reviewers:
yzshen1
CC:
chromium-reviews, yusukes+watch_chromium.org, mlamouri+watch-content_chromium.org, tburkard+watch_chromium.org, johnme+watch_chromium.org, browser-components-watch_chromium.org, stevenjb+watch_chromium.org, extensions-reviews_chromium.org, cbentzel+watch_chromium.org, grt+watch_chromium.org, tzik, jam, nona+watch_chromium.org, darin-cc_chromium.org, chromium-apps-reviews_chromium.org, michaeln, nhiroki, gavinp+prer_chromium.org, pam+watch_chromium.org, oshima+watch_chromium.org, rouslan+autofillwatch_chromium.org, davidben+watch_chromium.org, feature-media-reviews_chromium.org, wfh+watch_chromium.org, shuchen+watch_chromium.org, mvanouwerkerk+watch_chromium.org, davemoore+watch_chromium.org, mkwst+moarreviews-renderer_chromium.org, estade+watch_chromium.org, peter+watch_chromium.org, James Su, kinuko+fileapi, 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

Replace StringToLowerASCII with base::ToLowerASCII Standardize on using string pieces and returning strings. Remove in-place version (this was only used in a couple places and they were not performance-critical). De-templatize the character versions of ToUpperASCII/ToLowerASCII. This would lead to bizarre errors if you pass other things (like a string). This is so little code, it's now just duplicated. I renamed StringToLowerASCII to just be ToLowerASCII so you can pass whatever you want to ToLowerASCII and it does the right thing. This seems simpler to me. This replaces all calls of StringToUpperASCII to the new form. The lowercase version is more common and will be done in a separate pass. Committed: https://crrev.com/c15100ce1266e52a77f2974ffe9dfb833f5e58b3 Cr-Commit-Position: refs/heads/master@{#342219}

Patch Set 1 #

Patch Set 2 : #

Total comments: 2

Patch Set 3 : char16 #

Total comments: 4

Patch Set 4 : review comments #

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+115 lines, -80 lines) Patch
M base/environment.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M base/files/file_util_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M base/guid_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M base/strings/string_util.h View 1 2 3 3 chunks +18 lines, -16 lines 0 comments Download
M base/strings/string_util.cc View 1 2 3 1 chunk +38 lines, -0 lines 0 comments Download
M base/strings/string_util_unittest.cc View 1 2 1 chunk +18 lines, -18 lines 0 comments Download
M chrome/browser/chromeos/input_method/input_method_util.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/prerender/prerender_manager.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/push_messaging/push_messaging_app_identifier.cc View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/supervised_user/supervised_user_url_filter.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/installer/util/l10n_string_util.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M components/autofill/core/browser/address.cc View 1 chunk +1 line, -1 line 0 comments Download
M components/autofill/core/browser/autofill_country.cc View 1 chunk +2 lines, -4 lines 0 comments Download
M components/autofill/core/browser/personal_data_manager.cc View 1 chunk +1 line, -1 line 0 comments Download
M components/dom_distiller/core/viewer.cc View 1 chunk +1 line, -1 line 0 comments Download
M components/policy/core/common/cloud/cloud_policy_validator_unittest.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M components/test_runner/event_sender.cc View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M components/translate/core/language_detection/language_detection_util.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M content/browser/renderer_host/input/web_input_event_util.cc View 1 2 3 4 1 chunk +5 lines, -4 lines 0 comments Download
M content/child/appcache/web_application_cache_host_impl.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/android/phone_number_detector.cc View 1 chunk +1 line, -1 line 0 comments Download
M extensions/renderer/runtime_custom_bindings.cc View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M media/base/mime_util.cc View 2 chunks +2 lines, -3 lines 0 comments Download
M net/http/http_auth_handler_ntlm_portable.cc View 1 chunk +1 line, -1 line 0 comments Download
M net/http/http_util_unittest.cc View 2 chunks +2 lines, -4 lines 0 comments Download
M storage/common/fileapi/file_system_util.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M ui/base/ime/chromeos/input_method_descriptor.cc View 1 1 chunk +2 lines, -3 lines 0 comments Download

Messages

Total messages: 30 (14 generated)
brettw
5 years, 4 months ago (2015-08-05 22:35:05 UTC) #2
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1280473002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1280473002/20001
5 years, 4 months ago (2015-08-05 22:38:13 UTC) #4
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: android_chromium_gn_compile_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/android_chromium_gn_compile_rel/builds/116653) ios_dbg_simulator_ninja on ...
5 years, 4 months ago (2015-08-05 22:59:26 UTC) #6
yzshen1
https://codereview.chromium.org/1280473002/diff/20001/base/strings/string_util_unittest.cc File base/strings/string_util_unittest.cc (right): https://codereview.chromium.org/1280473002/diff/20001/base/strings/string_util_unittest.cc#newcode511 base/strings/string_util_unittest.cc:511: EXPECT_EQ(L'c', ToLowerASCII(L'C')); The compiler complains about ambiguity. It doesn't ...
5 years, 4 months ago (2015-08-05 23:21:04 UTC) #7
brettw
https://codereview.chromium.org/1280473002/diff/20001/base/strings/string_util_unittest.cc File base/strings/string_util_unittest.cc (right): https://codereview.chromium.org/1280473002/diff/20001/base/strings/string_util_unittest.cc#newcode511 base/strings/string_util_unittest.cc:511: EXPECT_EQ(L'c', ToLowerASCII(L'C')); Actually this test just needed updating. I ...
5 years, 4 months ago (2015-08-06 17:13:53 UTC) #8
yzshen1
LGTM with two nits. Thanks! https://codereview.chromium.org/1280473002/diff/40001/base/strings/string_util.cc File base/strings/string_util.cc (right): https://codereview.chromium.org/1280473002/diff/40001/base/strings/string_util.cc#newcode152 base/strings/string_util.cc:152: StringType ToLowerASCIIT(BasicStringPiece<StringType> str) { ...
5 years, 4 months ago (2015-08-06 18:07:19 UTC) #9
brettw
https://codereview.chromium.org/1280473002/diff/40001/base/strings/string_util.cc File base/strings/string_util.cc (right): https://codereview.chromium.org/1280473002/diff/40001/base/strings/string_util.cc#newcode152 base/strings/string_util.cc:152: StringType ToLowerASCIIT(BasicStringPiece<StringType> str) { Done, used "Impl" https://codereview.chromium.org/1280473002/diff/40001/base/strings/string_util.h File ...
5 years, 4 months ago (2015-08-06 18:23:04 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1280473002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1280473002/60001
5 years, 4 months ago (2015-08-06 18:23:47 UTC) #13
commit-bot: I haz the power
Try jobs failed on following builders: android_chromium_gn_compile_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/android_chromium_gn_compile_rel/builds/117024)
5 years, 4 months ago (2015-08-06 18:43:21 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1280473002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1280473002/80001
5 years, 4 months ago (2015-08-06 19:04:50 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_gn_chromeos_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_chromeos_rel/builds/66456)
5 years, 4 months ago (2015-08-06 19:29:20 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1280473002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1280473002/100001
5 years, 4 months ago (2015-08-06 19:34:44 UTC) #23
commit-bot: I haz the power
Try jobs failed on following builders: ios_rel_device_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_rel_device_ninja/builds/96117)
5 years, 4 months ago (2015-08-06 20:21:12 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1280473002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1280473002/120001
5 years, 4 months ago (2015-08-06 20:26:19 UTC) #28
commit-bot: I haz the power
Committed patchset #7 (id:120001)
5 years, 4 months ago (2015-08-06 22:54:27 UTC) #29
commit-bot: I haz the power
5 years, 4 months ago (2015-08-06 22:55:29 UTC) #30
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/c15100ce1266e52a77f2974ffe9dfb833f5e58b3
Cr-Commit-Position: refs/heads/master@{#342219}

Powered by Google App Engine
This is Rietveld 408576698