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

Issue 2485253002: Remove unnecessary calls to GURL() (Closed)

Created:
4 years, 1 month ago by cfredric
Modified:
4 years, 1 month ago
CC:
browser-components-watch_chromium.org, cbentzel+watch_chromium.org, chromium-apps-reviews_chromium.org, chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, dbeam+watch-history_chromium.org, Patrick Dubroy, extensions-reviews_chromium.org, fukino+watch_chromium.org, jam, markusheintz_, michaeln, mlamouri+watch-permissions_chromium.org, mlamouri+watch-content_chromium.org, msramek+watch_chromium.org, nasko+codewatch_chromium.org, ntp-dev+reviews_chromium.org, oka+watch_chromium.org, pam+watch_chromium.org, sdefresne+watch_chromium.org, tfarina, yamaguchi+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove unnecessary calls to GURL(). This follows on to https://codereview.chromium.org/2421383003, and updates a few more usages of operator==(const GURL& x, const GURL& y) to use operator==(const GURL& x, const base::StringPiece& spec) instead. This updates usages of the appropriate operator!= as well. BUG=655467 Committed: https://crrev.com/370250aa8528244380cc222f15ef2467d582a493 Cr-Commit-Position: refs/heads/master@{#432275}

Patch Set 1 #

Patch Set 2 : Refactor usages of !=. Explicitly convert char16[]. #

Patch Set 3 : Fix broken tests #

Total comments: 16

Patch Set 4 : Canonicalize some urls. #

Patch Set 5 : Assert that StringPiece must always be canonicalized. Fix some constants. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+77 lines, -78 lines) Patch
M android_webview/browser/aw_permission_manager_unittest.cc View 1 2 2 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/bookmarks/managed_bookmark_service_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/browser_about_handler.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/browsing_data/conditional_cache_deletion_helper_browsertest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/captive_portal/captive_portal_browsertest.cc View 3 chunks +6 lines, -6 lines 0 comments Download
M chrome/browser/extensions/api/web_navigation/frame_navigation_state.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/api/web_navigation/web_navigation_api.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/tab_helper.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/history/history_tab_helper.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/permissions/permission_decision_auto_blocker_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/printing/cloud_print/privet_notifications_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/search/search_tab_helper.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/webui/browsing_history_handler_unittest.cc View 5 chunks +20 lines, -20 lines 0 comments Download
M components/bookmarks/managed/managed_bookmarks_tracker_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M components/data_usage/core/data_use_aggregator_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M components/drive/drive_uploader_unittest.cc View 3 chunks +5 lines, -5 lines 0 comments Download
M components/error_page/renderer/net_error_helper_core.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M components/history/core/browser/history_querying_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M components/history/core/test/fake_web_history_service.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M components/navigation_interception/intercept_navigation_throttle_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M components/ntp_snippets/remote/ntp_snippets_fetcher.cc View 1 1 chunk +4 lines, -4 lines 0 comments Download
M components/security_state/security_state_model_unittest.cc View 1 2 3 4 2 chunks +3 lines, -3 lines 0 comments Download
M content/browser/appcache/appcache_request_handler_unittest.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M content/browser/fileapi/obfuscated_file_util_unittest.cc View 1 2 chunks +6 lines, -6 lines 0 comments Download
M content/browser/quota/quota_manager_unittest.cc View 1 chunk +1 line, -2 lines 0 comments Download
M content/public/common/url_constants.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/render_frame_impl.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/render_view_browsertest.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/test/data/dom_storage/webcore_test_database.localstorage View 1 Binary file 0 comments Download
M extensions/browser/guest_view/extension_view/extension_view_guest.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M ios/chrome/browser/browser_about_rewriter.cc View 1 chunk +1 line, -2 lines 0 comments Download
M ios/chrome/browser/history/history_utils.cc View 1 chunk +1 line, -1 line 0 comments Download
M url/gurl.cc View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 52 (26 generated)
cfredric
rockot@chromium.org: Please review changes in chrome/browser/android/data_usage/data_use_ui_tab_model.cc. treib@chromium.org: Please review changes in components/ntp_snippets/remote/ntp_snippets_fetcher.cc. fukino@chromium.org: Please review ...
4 years, 1 month ago (2016-11-09 21:00:16 UTC) #17
esprehn
https://codereview.chromium.org/2485253002/diff/40001/chrome/browser/android/data_usage/data_use_ui_tab_model.cc File chrome/browser/android/data_usage/data_use_ui_tab_model.cc (right): https://codereview.chromium.org/2485253002/diff/40001/chrome/browser/android/data_usage/data_use_ui_tab_model.cc#newcode195 chrome/browser/android/data_usage/data_use_ui_tab_model.cc:195: DCHECK(!navigation_entry || (navigation_entry->GetURL() == url)); why don't we need ...
4 years, 1 month ago (2016-11-09 21:09:25 UTC) #19
Charlie Harrison
Generally looks good, but I'm wary of using this operator on dynamic values unless we ...
4 years, 1 month ago (2016-11-09 21:12:59 UTC) #20
Eugene But (OOO till 7-30)
ios lgtm
4 years, 1 month ago (2016-11-09 21:18:26 UTC) #21
esprehn
Can we assert inside the operator that the value must be canonicalized? bool operator==(const GURL& ...
4 years, 1 month ago (2016-11-09 21:21:25 UTC) #22
cfredric
On 2016/11/09 21:21:25, esprehn wrote: > Can we assert inside the operator that the value ...
4 years, 1 month ago (2016-11-09 22:09:59 UTC) #23
cfredric
https://codereview.chromium.org/2485253002/diff/40001/chrome/browser/android/data_usage/data_use_ui_tab_model.cc File chrome/browser/android/data_usage/data_use_ui_tab_model.cc (right): https://codereview.chromium.org/2485253002/diff/40001/chrome/browser/android/data_usage/data_use_ui_tab_model.cc#newcode185 chrome/browser/android/data_usage/data_use_ui_tab_model.cc:185: GURL(url), &transition_type)) { On 2016/11/09 21:12:58, Charlie Harrison wrote: ...
4 years, 1 month ago (2016-11-09 22:12:46 UTC) #24
tsergeant
browsing_history_handler_unittest lgtm
4 years, 1 month ago (2016-11-09 23:10:38 UTC) #25
boliu
a_w lgtm
4 years, 1 month ago (2016-11-09 23:15:48 UTC) #26
sclittle
components/data_usage lgtm
4 years, 1 month ago (2016-11-09 23:24:40 UTC) #27
sky
LGTM
4 years, 1 month ago (2016-11-10 00:01:38 UTC) #28
Charlie Harrison
On 2016/11/09 22:09:59, cfredric wrote: > On 2016/11/09 21:21:25, esprehn wrote: > > Can we ...
4 years, 1 month ago (2016-11-10 00:05:54 UTC) #29
estark
components/security_state/security_state_model_unittest.cc lgtm
4 years, 1 month ago (2016-11-10 00:58:12 UTC) #30
esprehn
lgtm
4 years, 1 month ago (2016-11-10 00:58:46 UTC) #31
michaelbai
android_webview and components/navigation_interception LGTM
4 years, 1 month ago (2016-11-10 02:01:08 UTC) #32
Marc Treib
components/ntp_snippets/ lgtm, assuming we get that DCHECK in the operator== implementation
4 years, 1 month ago (2016-11-10 09:11:51 UTC) #33
cfredric
clamy@chromium.org: Please review changes in content/public/common/url_constants.cc. abarth@chromium.org: Please review changes in url/gurl.cc. estark@chromium.org: Please review ...
4 years, 1 month ago (2016-11-10 15:29:15 UTC) #35
Charlie Harrison
//url non-owners LGTM
4 years, 1 month ago (2016-11-10 15:54:48 UTC) #38
Ken Rockot(use gerrit already)
lgtm
4 years, 1 month ago (2016-11-10 17:20:01 UTC) #41
Zhongyi Shi
lgtm
4 years, 1 month ago (2016-11-10 18:50:24 UTC) #42
Charlie Harrison
-abarth, +brettw for DCHECK in gurl.
4 years, 1 month ago (2016-11-11 16:02:29 UTC) #44
Julia Tuttle
components/error_page lgtm.
4 years, 1 month ago (2016-11-14 18:54:34 UTC) #45
brettw
url lgtm
4 years, 1 month ago (2016-11-14 19:14:42 UTC) #46
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/2485253002/80001
4 years, 1 month ago (2016-11-15 20:02:26 UTC) #49
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 1 month ago (2016-11-15 22:39:39 UTC) #50
commit-bot: I haz the power
4 years, 1 month ago (2016-11-15 22:46:31 UTC) #52
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/370250aa8528244380cc222f15ef2467d582a493
Cr-Commit-Position: refs/heads/master@{#432275}

Powered by Google App Engine
This is Rietveld 408576698