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

Issue 1220653002: Fix some case-insensitive cases for StartsWith (Closed)

Created:
5 years, 5 months ago by brettw
Modified:
5 years, 5 months ago
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, cbentzel+watch_chromium.org, browser-components-watch_chromium.org, vabr+watchlist_chromium.org, Paweł Hajdan Jr., jam, noyau+watch_chromium.org, darin-cc_chromium.org, rouslan+autofillwatch_chromium.org, tfarina, mkwst+moarreviews-renderer_chromium.org, estade+watch_chromium.org, gcasto+watchlist_chromium.org, erikwright+watch_chromium.org, jshin+watch_chromium.org, mkwst+watchlist-passwords_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix some case-insensitive cases for StartsWith. This is not all callers so the old function is not deleted. Most calls are replaced with either StartsWith with the enum, or StartsWith(base::i18n::ToLower(...) for cases that need truely-internationalized case comparison (or when I wasn't sure). The most interesting case is chrome/installer/util which can't depend on base/i18n and it wants Unicode case-insensitive compares. I replaced these with a call to the Win32 function CompareString Add a missing protobuf dependency in components/storage_monitor that a try run turned up. In a few cases there is some related cleanup when I touched code: SplitString calls in experiment_labels.cc (which I've been doing patches to update), for loop in gcapi_omaha_experiment.cc, In some cases, a ToLower call was pulled out of a loop as in autofill_agent.cc. From this file I also removed a redundant comparison since the code checked it if was equal or a prefix, and a prefix returns true if it's equal. BUG=506255 Committed: https://crrev.com/94a2cc2c77b73aaaceae5de709c6b453f8fe2c0e Cr-Commit-Position: refs/heads/master@{#337093}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : #

Total comments: 4

Patch Set 8 : #

Patch Set 9 : Mac fix #

Total comments: 5

Patch Set 10 : grt's review comments, Mac fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+185 lines, -89 lines) Patch
M chrome/browser/enumerate_modules_model_win.cc View 1 2 chunks +8 lines, -4 lines 0 comments Download
M chrome/common/variations/experiment_labels.cc View 1 2 chunks +18 lines, -12 lines 0 comments Download
M chrome/installer/gcapi/gcapi_omaha_experiment.cc View 1 2 3 4 5 6 7 8 9 1 chunk +7 lines, -4 lines 0 comments Download
M chrome/installer/util/delete_after_reboot_helper.cc View 1 2 3 4 5 6 7 8 9 2 chunks +15 lines, -8 lines 0 comments Download
M chrome/installer/util/install_util.cc View 1 2 3 4 5 6 7 8 9 2 chunks +12 lines, -1 line 0 comments Download
M chrome/installer/util/shell_util_unittest.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M components/autofill/content/browser/wallet/wallet_service_url.cc View 1 2 3 4 5 1 chunk +5 lines, -3 lines 0 comments Download
M components/autofill/content/renderer/BUILD.gn View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M components/autofill/content/renderer/autofill_agent.cc View 1 2 3 4 5 2 chunks +8 lines, -4 lines 0 comments Download
M components/autofill/content/renderer/password_autofill_agent.cc View 1 2 3 chunks +13 lines, -5 lines 0 comments Download
M components/autofill/content/renderer/password_form_conversion_utils.cc View 1 2 2 chunks +5 lines, -1 line 0 comments Download
M components/autofill/core/browser/personal_data_manager.cc View 1 2 4 chunks +10 lines, -4 lines 0 comments Download
M components/bookmarks/browser/bookmark_utils.cc View 1 2 3 4 5 6 1 chunk +4 lines, -1 line 0 comments Download
M components/browser_watcher/exit_code_watcher_win_unittest.cc View 1 1 chunk +4 lines, -2 lines 0 comments Download
M components/omnibox/answers_cache.cc View 2 chunks +5 lines, -2 lines 0 comments Download
M components/omnibox/base_search_provider.cc View 1 2 1 chunk +3 lines, -1 line 0 comments Download
M components/omnibox/search_suggestion_parser.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M components/omnibox/suggestion_answer.cc View 1 chunk +2 lines, -1 line 0 comments Download
M components/omnibox/url_prefix.cc View 2 chunks +5 lines, -1 line 0 comments Download
M components/password_manager/core/browser/password_autofill_manager.cc View 1 2 4 chunks +11 lines, -4 lines 0 comments Download
M components/policy/core/common/preg_parser_win.cc View 1 2 3 4 2 chunks +4 lines, -1 line 0 comments Download
M components/search_engines/template_url_service_util_unittest.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M components/storage_monitor/BUILD.gn View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M components/storage_monitor/portable_device_watcher_win.cc View 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/loader/resource_dispatcher_host_browsertest.cc View 1 4 chunks +8 lines, -4 lines 0 comments Download
M content/common/plugin_list_mac.mm View 1 2 3 4 5 6 7 8 9 2 chunks +12 lines, -10 lines 0 comments Download
M extensions/common/extension_urls.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M net/base/net_util.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M net/base/net_util_icu.cc View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M net/ftp/ftp_directory_listing_parser_netware.cc View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M net/ftp/ftp_directory_listing_parser_vms.cc View 1 2 3 4 5 3 chunks +9 lines, -7 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 37 (17 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/1220653002/60001
5 years, 5 months ago (2015-06-29 06:03:56 UTC) #2
commit-bot: I haz the power
Dry run: Exceeded global retry quota
5 years, 5 months ago (2015-06-29 06:22:27 UTC) #4
brettw
Please review carefully, don't rubberstamp. Sorry
5 years, 5 months ago (2015-06-30 23:41:07 UTC) #6
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1220653002/120001
5 years, 5 months ago (2015-06-30 23:42:32 UTC) #8
commit-bot: I haz the power
Dry run: Exceeded global retry quota
5 years, 5 months ago (2015-07-01 00:07:33 UTC) #10
sky
https://codereview.chromium.org/1220653002/diff/120001/chrome/common/variations/experiment_labels.cc File chrome/common/variations/experiment_labels.cc (right): https://codereview.chromium.org/1220653002/diff/120001/chrome/common/variations/experiment_labels.cc#newcode100 chrome/common/variations/experiment_labels.cc:100: DCHECK(!base::StartsWith(variation_labels, separator, I'm not familiar with this code. How ...
5 years, 5 months ago (2015-07-01 03:18:28 UTC) #11
vabr (Chromium)
FWIW, components/autofill/content/renderer/password_autofill_agent.cc, components/autofill/content/renderer/password_form_conversion_utils.cc and components/password_manager/core/browser/password_autofill_manager.cc LGTM. Is there a bug tracking these changes? I could ...
5 years, 5 months ago (2015-07-01 09:22:04 UTC) #13
brettw
+grt for chrome/installer. I filed a bug for this work https://codereview.chromium.org/1220653002/diff/120001/chrome/common/variations/experiment_labels.cc File chrome/common/variations/experiment_labels.cc (right): https://codereview.chromium.org/1220653002/diff/120001/chrome/common/variations/experiment_labels.cc#newcode100 ...
5 years, 5 months ago (2015-07-01 16:54:27 UTC) #15
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1220653002/140001
5 years, 5 months ago (2015-07-01 16:56:08 UTC) #18
commit-bot: I haz the power
Dry run: Exceeded global retry quota
5 years, 5 months ago (2015-07-01 17:11:36 UTC) #20
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1220653002/160001
5 years, 5 months ago (2015-07-01 17:24:59 UTC) #23
sky
LGTM
5 years, 5 months ago (2015-07-01 17:25:23 UTC) #24
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_compile_dbg_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/69484)
5 years, 5 months ago (2015-07-01 17:49:20 UTC) #26
grt (UTC plus 2)
https://codereview.chromium.org/1220653002/diff/160001/chrome/installer/gcapi/gcapi_omaha_experiment.cc File chrome/installer/gcapi/gcapi_omaha_experiment.cc (right): https://codereview.chromium.org/1220653002/diff/160001/chrome/installer/gcapi/gcapi_omaha_experiment.cc#newcode53 chrome/installer/gcapi/gcapi_omaha_experiment.cc:53: !base::StartsWith(entry, label + L"=", base::CompareCase::SENSITIVE)) { wdyt of pulling ...
5 years, 5 months ago (2015-07-01 17:55:42 UTC) #27
brettw
grt: New patch up with comments addressed.
5 years, 5 months ago (2015-07-01 18:17:42 UTC) #28
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1220653002/180001
5 years, 5 months ago (2015-07-01 18:17:59 UTC) #31
grt (UTC plus 2)
chrome/installer lgtm
5 years, 5 months ago (2015-07-01 18:29:37 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1220653002/180001
5 years, 5 months ago (2015-07-01 19:00:04 UTC) #35
commit-bot: I haz the power
Committed patchset #10 (id:180001)
5 years, 5 months ago (2015-07-01 19:27:02 UTC) #36
commit-bot: I haz the power
5 years, 5 months ago (2015-07-01 19:29:10 UTC) #37
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/94a2cc2c77b73aaaceae5de709c6b453f8fe2c0e
Cr-Commit-Position: refs/heads/master@{#337093}

Powered by Google App Engine
This is Rietveld 408576698