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

Issue 2421383003: Add operator==(const GURL&, const StringPiece&) to gurl.h (Closed)

Created:
4 years, 2 months ago by Charlie Harrison
Modified:
4 years, 2 months ago
Reviewers:
brettw
CC:
chromium-reviews, asanka, extensions-reviews_chromium.org, cbentzel+watch_chromium.org, creis+watch_chromium.org, vabr+watchlistpasswordmanager_chromium.org, mlamouri+watch-content_chromium.org, rouslan+autofill_chromium.org, jam, nasko+codewatch_chromium.org, browser-components-watch_chromium.org, chromium-apps-reviews_chromium.org, jdonnelly+autofillwatch_chromium.org, darin-cc_chromium.org, mac-reviews_chromium.org, vabr+watchlistautofill_chromium.org, estade+watch_chromium.org, gcasto+watchlist_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add operator==(const GURL&, const StringPiece&) to gurl.h. This patch moves GURL::operator==(const GURL&) to a free-floating function, and adds a new function to allow comparisons with StringPiece specs. The new equality operator should be used when the spec of the URL is known apriori, and parsing a GURL is not necessary for a comparison. This is specifically designed to replace the case where we compare: <url> = GURL(kUrlStringConstant). One such case is replaced by this patch, and the rest will be modified in a followup. Note: this patch requires changes to instances of base::Bind(&GURL::operator==...). They have been edited to use static_cast to let Bind know that the operator== acts on GURLs. BUG=655467 Committed: https://crrev.com/ebeca8e21727b975523416e9abaa2a4024ac36f5 Cr-Commit-Position: refs/heads/master@{#425863}

Patch Set 1 #

Total comments: 1

Patch Set 2 : remove comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+71 lines, -45 lines) Patch
M chrome/browser/history/history_utils.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/password_manager/native_backend_gnome_x_unittest.cc View 1 chunk +7 lines, -5 lines 0 comments Download
M chrome/browser/password_manager/native_backend_kwallet_x_unittest.cc View 1 chunk +7 lines, -5 lines 0 comments Download
M chrome/browser/password_manager/native_backend_libsecret_unittest.cc View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/password_manager/password_store_mac_unittest.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/search_engines/template_url_service_unittest.cc View 3 chunks +9 lines, -6 lines 0 comments Download
M chrome/renderer/autofill/form_autofill_browsertest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/renderer/extensions/chrome_extensions_renderer_client.cc View 1 chunk +1 line, -1 line 0 comments Download
M components/domain_reliability/monitor_unittest.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M components/password_manager/core/browser/statistics_table_unittest.cc View 1 chunk +2 lines, -1 line 0 comments Download
M components/power/origin_power_map_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/download/download_manager_impl_unittest.cc View 1 chunk +2 lines, -1 line 0 comments Download
M content/renderer/render_frame_impl.cc View 1 chunk +1 line, -1 line 0 comments Download
M extensions/renderer/script_injection_manager.cc View 1 chunk +1 line, -1 line 0 comments Download
M net/quic/chromium/quic_stream_factory_test.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M url/gurl.h View 1 2 chunks +9 lines, -4 lines 0 comments Download
M url/gurl.cc View 2 chunks +16 lines, -8 lines 0 comments Download

Messages

Total messages: 21 (13 generated)
Charlie Harrison
Hi Brett, PTAL? This change is now the dependent PS for https://codereview.chromium.org/2409423005 which just changes ...
4 years, 2 months ago (2016-10-17 19:42:48 UTC) #6
brettw
lgtm https://codereview.chromium.org/2421383003/diff/1/url/gurl.h File url/gurl.h (right): https://codereview.chromium.org/2421383003/diff/1/url/gurl.h#newcode446 url/gurl.h:446: // Defiant equality operator! I think this weird ...
4 years, 2 months ago (2016-10-17 22:58:59 UTC) #9
Charlie Harrison
Thanks! I'll go ahead and land this.
4 years, 2 months ago (2016-10-17 23:07:02 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2421383003/20001
4 years, 2 months ago (2016-10-17 23:08:09 UTC) #13
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/316434)
4 years, 2 months ago (2016-10-18 00:42:39 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2421383003/20001
4 years, 2 months ago (2016-10-18 00:51:09 UTC) #17
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 2 months ago (2016-10-18 02:35:57 UTC) #19
commit-bot: I haz the power
4 years, 2 months ago (2016-10-18 02:38:40 UTC) #21
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/ebeca8e21727b975523416e9abaa2a4024ac36f5
Cr-Commit-Position: refs/heads/master@{#425863}

Powered by Google App Engine
This is Rietveld 408576698