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

Issue 2515823002: Remove WebContents::GetRoutingID(). (Closed)

Created:
4 years, 1 month ago by davidsac (gone - try alexmos)
Modified:
4 years ago
CC:
chromium-reviews, asanka, skanuj+watch_chromium.org, dhollowa+watch_chromium.org, dougw+watch_chromium.org, nasko+codewatch_chromium.org, extensions-reviews_chromium.org, wjmaclean, melevin+watch_chromium.org, jam, darin-cc_chromium.org, jochen+watch_chromium.org, loading-reviews_chromium.org, chromium-apps-reviews_chromium.org, mlamouri+watch-content_chromium.org, creis+watch_chromium.org, Peter Beverloo, Randy Smith (Not in Mondays), jfweitz+watch_chromium.org, Jered, mlamouri+watch-test-runner_chromium.org, donnd+watch_chromium.org, David Black, samarth+watch_chromium.org, kmadhusu+watch_chromium.org, einbinder+watch-test-runner_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove WebContents::GetRoutingID(). Replace all definitions, declarations, and uses of WebContents::GetRoutingID() with web_contents->GetRenderViewHost()->GetRoutingID(). This will make it more clear which routing id is being used. Having GetRoutingID() on WebContents is both confusing (WebContents isn't a routable object) and is prone to misuse with OOPIFs. No behaviour changes should be caused by this CL. BUG=666525 Committed: https://crrev.com/996be1115fde6db6ff18ed5b03278a6610a5eb38 Cr-Commit-Position: refs/heads/master@{#435182}

Patch Set 1 #

Patch Set 2 : n #

Patch Set 3 : deleted all definitions and declarations of GetRoutingID #

Patch Set 4 : deleted all definitions and declarations of GetRoutingID #

Patch Set 5 : deleted all definitions and declarations of GetRoutingID #

Total comments: 3

Patch Set 6 : rebased #

Total comments: 5

Patch Set 7 : added a TODO for the external protocol bug #

Total comments: 1

Patch Set 8 : removed faulty and conflicting change from print_preview_handler.cc #

Total comments: 2

Patch Set 9 : add render_view_host.h include in resource_dispatcher_host_unittest.cc #

Patch Set 10 : add render_view_host.h include in resource_dispatcher_host_unittest.cc #

Patch Set 11 : add render_view_host.h include in resource_dispatcher_host_unittest.cc #

Unified diffs Side-by-side diffs Delta from patch set Stats (+90 lines, -75 lines) Patch
M android_webview/native/aw_contents.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/android/download/download_controller.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/android/tab_android.cc View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/download/download_resource_throttle_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/api/declarative_content/declarative_content_css_condition_tracker_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc View 1 2 3 4 5 6 1 chunk +6 lines, -2 lines 0 comments Download
M chrome/browser/ui/blocked_content/popup_blocker_tab_helper.cc View 1 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/ui/search/instant_tab_unittest.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/ui/search/search_ipc_router_unittest.cc View 21 chunks +42 lines, -29 lines 0 comments Download
M chrome/browser/ui/search/search_tab_helper_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/android/content_view_core_impl.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -1 line 0 comments Download
M content/browser/host_zoom_map_impl.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/host_zoom_map_impl_browsertest.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/loader/resource_dispatcher_host_unittest.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +6 lines, -4 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.h View 1 2 3 4 5 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +3 lines, -9 lines 0 comments Download
M content/public/browser/web_contents.h View 1 chunk +0 lines, -4 lines 0 comments Download
M content/public/browser/web_contents_observer.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/visual_state_browsertest.cc View 1 2 2 chunks +3 lines, -2 lines 0 comments Download
M content/shell/browser/layout_test/blink_test_controller.cc View 1 chunk +1 line, -1 line 0 comments Download
M extensions/browser/guest_view/web_view/web_view_guest.cc View 3 chunks +8 lines, -9 lines 0 comments Download

Messages

Total messages: 80 (56 generated)
davidsac (gone - try alexmos)
4 years, 1 month ago (2016-11-18 20:17:21 UTC) #4
alexmos
Thanks! Looks like there's another call site in aw_contents.cc that you'll need to update to ...
4 years, 1 month ago (2016-11-21 18:04:10 UTC) #11
alexmos
Thanks, LGTM now that the trybots are getting green. A few observations below, but I ...
4 years, 1 month ago (2016-11-22 01:29:06 UTC) #26
davidsac (gone - try alexmos)
Charlie, can you please review my CL in content/ for OWNERS?
4 years, 1 month ago (2016-11-22 21:23:19 UTC) #30
Charlie Reis
[+nick] Thanks for the cleanup! It's good to use this as a chance to audit ...
4 years ago (2016-11-23 07:53:35 UTC) #32
ncarter (slow)
https://codereview.chromium.org/2515823002/diff/100001/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc File chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc (right): https://codereview.chromium.org/2515823002/diff/100001/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc#newcode248 chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc:248: web_contents->GetRenderViewHost()->GetRoutingID()); On 2016/11/23 07:53:35, Charlie Reis (slow) wrote: > ...
4 years ago (2016-11-23 18:04:22 UTC) #33
alexmos
https://codereview.chromium.org/2515823002/diff/100001/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc File chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc (right): https://codereview.chromium.org/2515823002/diff/100001/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc#newcode248 chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc:248: web_contents->GetRenderViewHost()->GetRoutingID()); On 2016/11/23 18:04:22, ncarter wrote: > On 2016/11/23 ...
4 years ago (2016-11-23 22:46:20 UTC) #37
Charlie Reis
LGTM https://codereview.chromium.org/2515823002/diff/100001/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc File chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc (right): https://codereview.chromium.org/2515823002/diff/100001/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc#newcode248 chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc:248: web_contents->GetRenderViewHost()->GetRoutingID()); On 2016/11/23 22:46:20, alexmos wrote: > On ...
4 years ago (2016-11-23 22:48:27 UTC) #38
davidsac (gone - try alexmos)
rdevlin.cronin@chromium.org for extensions/ sgurun@chromium.org for android_webview/ thestig@chromium.org for chrome/
4 years ago (2016-11-24 02:10:24 UTC) #40
davidsac (gone - try alexmos)
On 2016/11/24 02:10:24, davidsac wrote: > mailto:rdevlin.cronin@chromium.org for extensions/ > mailto:sgurun@chromium.org for android_webview/ > mailto:thestig@chromium.org ...
4 years ago (2016-11-24 02:12:17 UTC) #41
Lei Zhang
This looks good, but... https://codereview.chromium.org/2515823002/diff/120001/chrome/browser/ui/webui/print_preview/print_preview_handler.cc File chrome/browser/ui/webui/print_preview/print_preview_handler.cc (right): https://codereview.chromium.org/2515823002/diff/120001/chrome/browser/ui/webui/print_preview/print_preview_handler.cc#newcode925 chrome/browser/ui/webui/print_preview/print_preview_handler.cc:925: initiator->GetRenderViewHost()->GetRoutingID()); Uh oh, this is ...
4 years ago (2016-11-24 17:18:26 UTC) #42
Devlin
extensions lgtm Note: WebContents::GetRoutingID() would check the render view host for nullness first. The extensions ...
4 years ago (2016-11-28 16:19:29 UTC) #43
ncarter (slow)
On 2016/11/28 16:19:29, Devlin wrote: > extensions lgtm > > Note: WebContents::GetRoutingID() would check the ...
4 years ago (2016-11-28 18:04:48 UTC) #44
davidsac (gone - try alexmos)
The change to print_preview_handler.cc has been removed as discussed.
4 years ago (2016-11-28 18:44:31 UTC) #45
sgurun-gerrit only
On 2016/11/28 18:44:31, davidsac wrote: > The change to print_preview_handler.cc has been removed as discussed. ...
4 years ago (2016-11-28 18:51:39 UTC) #46
mmenke
https://codereview.chromium.org/2515823002/diff/140001/content/browser/loader/resource_dispatcher_host_unittest.cc File content/browser/loader/resource_dispatcher_host_unittest.cc (right): https://codereview.chromium.org/2515823002/diff/140001/content/browser/loader/resource_dispatcher_host_unittest.cc#newcode1201 content/browser/loader/resource_dispatcher_host_unittest.cc:1201: web_contents_->GetRenderViewHost()->GetRoutingID(), request_id, request); Need to include RenderViewHost header, and ...
4 years ago (2016-11-28 18:53:25 UTC) #48
davidsac (gone - try alexmos)
An include for "render_view_host.h" is now part of this Change List. https://codereview.chromium.org/2515823002/diff/140001/content/browser/loader/resource_dispatcher_host_unittest.cc File content/browser/loader/resource_dispatcher_host_unittest.cc (right): ...
4 years ago (2016-11-28 19:12:42 UTC) #51
mmenke
loader/ LGTM
4 years ago (2016-11-28 19:14:07 UTC) #52
Lei Zhang
lgtm now that https://crrev.com/434853 has landed. Thanks for waiting!
4 years ago (2016-11-29 03:49:46 UTC) #55
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/2515823002/160001
4 years ago (2016-11-29 18:28:17 UTC) #62
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/314670)
4 years ago (2016-11-29 18:48:32 UTC) #64
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/2515823002/200001
4 years ago (2016-11-30 07:36:28 UTC) #75
commit-bot: I haz the power
Committed patchset #11 (id:200001)
4 years ago (2016-11-30 08:57:11 UTC) #78
commit-bot: I haz the power
4 years ago (2016-11-30 09:02:06 UTC) #80
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/996be1115fde6db6ff18ed5b03278a6610a5eb38
Cr-Commit-Position: refs/heads/master@{#435182}

Powered by Google App Engine
This is Rietveld 408576698