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

Issue 2086423005: Using WebContents::UpdateTitleForEntry() instead of NavigationEntry::SetTitle() (Closed)

Created:
4 years, 6 months ago by afakhry
Modified:
4 years, 5 months ago
CC:
chromium-reviews, darin-cc_chromium.org, nasko+codewatch_chromium.org, jam, creis+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Using WebContents::UpdateTitleForEntry() instead of NavigationEntry::SetTitle() NavigationEntry::SetTitle() doesn't result in the emission of WebContentsObserver::TitleWasSet() events. This used to cause listeners like the task manager to show wrong titles of tabs (for example in the event of an interstitial page). BUG=607074 TEST=content_browsertests --gtest_filter=InterstitialPageImplTest.* CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_site_isolation Committed: https://crrev.com/6f0c1ec23bc1eabe221fccdb4b28b1d96273a705 Cr-Commit-Position: refs/heads/master@{#405485}

Patch Set 1 #

Patch Set 2 : Extend content_browsertests and fix failures #

Patch Set 3 : Make sure the renderer process is not shutting down. #

Patch Set 4 : Remove the unnecessary NOTREACHED() and update the Fav icon in the task manager. #

Patch Set 5 : DidFinishNavigation is received when RenderFrameHostImpl is destroyed!! #

Total comments: 25

Patch Set 6 : Charlie's comments #

Patch Set 7 : Stop listening to attach/detach #

Patch Set 8 : Use UpdateTitleForEntry() instead of SetTitle() whenever the entry belongs to a WebContents #

Patch Set 9 : Self review #

Patch Set 10 : Fix compile error #

Total comments: 11

Patch Set 11 : charlie's and nick's comments #

Patch Set 12 : Splitting the task manager changes into its own CL. #

Total comments: 4

Patch Set 13 : Using WebContents::UpdateTitleForEntry() instead of NavigationEntry::SetTitle() #

Total comments: 14

Patch Set 14 : thestig's comments #

Patch Set 15 : Improving comment and removing the NOTREACHED. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+62 lines, -121 lines) Patch
M chrome/browser/devtools/devtools_ui_bindings.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +2 lines, -4 lines 0 comments Download
M chrome/browser/media/tab_desktop_media_list_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/task_management/providers/web_contents/web_contents_task_provider.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +2 lines, -8 lines 1 comment Download
M chrome/browser/ui/browser_commands.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/search/search_tab_helper.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +6 lines, -3 lines 0 comments Download
M chrome/browser/ui/toolbar/back_forward_menu_model_unittest.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M chrome/test/base/browser_with_test_window_test.cc View 1 2 3 4 5 6 7 1 chunk +4 lines, -3 lines 0 comments Download
M content/browser/frame_host/interstitial_page_impl.cc View 1 2 3 4 5 6 7 8 3 chunks +4 lines, -8 lines 0 comments Download
M content/browser/frame_host/interstitial_page_impl_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +13 lines, -64 lines 0 comments Download
M content/browser/frame_host/navigation_controller_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/web_contents/web_contents_impl.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +2 lines, -14 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +7 lines, -10 lines 0 comments Download
M content/public/browser/navigation_entry.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +4 lines, -0 lines 0 comments Download
M content/public/browser/web_contents.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +6 lines, -0 lines 0 comments Download
M extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 46 (19 generated)
afakhry
Charlie, kindly review this CL. Thank you!
4 years, 6 months ago (2016-06-23 15:28:19 UTC) #4
afakhry
+nick@chromium.org for web_contents_task_provider.cc
4 years, 6 months ago (2016-06-23 18:43:45 UTC) #7
Charlie Reis
On 2016/06/23 15:28:19, afakhry wrote: > Charlie, kindly review this CL. Thank you! Sorry for ...
4 years, 6 months ago (2016-06-24 16:09:27 UTC) #8
Charlie Reis
Thanks for the fix, and sorry for my late review! I like where this is ...
4 years, 6 months ago (2016-06-24 22:21:17 UTC) #9
afakhry
https://codereview.chromium.org/2086423005/diff/80001/chrome/browser/task_management/providers/web_contents/guest_task.cc File chrome/browser/task_management/providers/web_contents/guest_task.cc (right): https://codereview.chromium.org/2086423005/diff/80001/chrome/browser/task_management/providers/web_contents/guest_task.cc#newcode44 chrome/browser/task_management/providers/web_contents/guest_task.cc:44: return base::string16(); On 2016/06/24 22:21:17, Charlie Reis (slow) wrote: ...
4 years, 5 months ago (2016-06-27 14:29:19 UTC) #10
Charlie Reis
Thanks-- a few more thoughts below. https://codereview.chromium.org/2086423005/diff/80001/chrome/browser/task_management/providers/web_contents/guest_task.cc File chrome/browser/task_management/providers/web_contents/guest_task.cc (right): https://codereview.chromium.org/2086423005/diff/80001/chrome/browser/task_management/providers/web_contents/guest_task.cc#newcode44 chrome/browser/task_management/providers/web_contents/guest_task.cc:44: return base::string16(); On ...
4 years, 5 months ago (2016-06-28 00:47:09 UTC) #11
afakhry
https://codereview.chromium.org/2086423005/diff/80001/chrome/browser/task_management/providers/web_contents/web_contents_task_provider.cc File chrome/browser/task_management/providers/web_contents/web_contents_task_provider.cc (right): https://codereview.chromium.org/2086423005/diff/80001/chrome/browser/task_management/providers/web_contents/web_contents_task_provider.cc#newcode205 chrome/browser/task_management/providers/web_contents/web_contents_task_provider.cc:205: void WebContentsEntry::DidAttachInterstitialPage() { On 2016/06/28 00:47:09, Charlie Reis wrote: ...
4 years, 5 months ago (2016-06-28 14:34:17 UTC) #12
Charlie Reis
Looks like we're getting to the heart of why observing title changes is difficult. :) ...
4 years, 5 months ago (2016-06-28 21:13:31 UTC) #13
afakhry
Charlie, please take a look. - I moved the UpdateTitleForEntry() to the base WebContents. - ...
4 years, 5 months ago (2016-07-13 00:37:22 UTC) #14
ncarter (slow)
This still needs charlie to look at it, but this right approach seems right to ...
4 years, 5 months ago (2016-07-13 18:56:02 UTC) #15
Charlie Reis
This looks great! The changes in the two task manager files could possibly go in ...
4 years, 5 months ago (2016-07-13 21:02:23 UTC) #16
afakhry
Done. I split the task manager changes into its own CL: https://codereview.chromium.org/2148083002 as recommended, and ...
4 years, 5 months ago (2016-07-13 22:10:27 UTC) #20
Charlie Reis
Thanks! LGTM. https://codereview.chromium.org/2086423005/diff/220001/content/browser/frame_host/interstitial_page_impl_browsertest.cc File content/browser/frame_host/interstitial_page_impl_browsertest.cc (right): https://codereview.chromium.org/2086423005/diff/220001/content/browser/frame_host/interstitial_page_impl_browsertest.cc#newcode295 content/browser/frame_host/interstitial_page_impl_browsertest.cc:295: title_update_watcher_->InitWait("TEXT_CHANGED"); Is it still useful to keep ...
4 years, 5 months ago (2016-07-13 22:21:48 UTC) #21
afakhry
https://codereview.chromium.org/2086423005/diff/220001/content/browser/frame_host/interstitial_page_impl_browsertest.cc File content/browser/frame_host/interstitial_page_impl_browsertest.cc (right): https://codereview.chromium.org/2086423005/diff/220001/content/browser/frame_host/interstitial_page_impl_browsertest.cc#newcode295 content/browser/frame_host/interstitial_page_impl_browsertest.cc:295: title_update_watcher_->InitWait("TEXT_CHANGED"); On 2016/07/13 22:21:47, Charlie Reis wrote: > Is ...
4 years, 5 months ago (2016-07-13 22:52:51 UTC) #23
afakhry
lazyboy@chromium.org: Please review changes in extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc thestig@chromium.org: Please review changes in chrome/browser/devtools/devtools_ui_bindings.cc chrome/browser/media/tab_desktop_media_list_unittest.cc chrome/browser/ui/browser_commands.cc chrome/browser/ui/search/search_tab_helper.cc ...
4 years, 5 months ago (2016-07-13 22:58:28 UTC) #26
Lei Zhang
On 2016/07/13 22:58:28, afakhry wrote: > mailto:thestig@chromium.org: Please review changes in > chrome/browser/devtools/devtools_ui_bindings.cc ... so ...
4 years, 5 months ago (2016-07-13 23:10:57 UTC) #27
Lei Zhang
lgtm https://codereview.chromium.org/2086423005/diff/240001/chrome/browser/devtools/devtools_ui_bindings.cc File chrome/browser/devtools/devtools_ui_bindings.cc (right): https://codereview.chromium.org/2086423005/diff/240001/chrome/browser/devtools/devtools_ui_bindings.cc#newcode47 chrome/browser/devtools/devtools_ui_bindings.cc:47: #include "content/public/browser/invalidate_type.h" Remove? https://codereview.chromium.org/2086423005/diff/240001/chrome/browser/media/tab_desktop_media_list_unittest.cc File chrome/browser/media/tab_desktop_media_list_unittest.cc (right): https://codereview.chromium.org/2086423005/diff/240001/chrome/browser/media/tab_desktop_media_list_unittest.cc#newcode142 ...
4 years, 5 months ago (2016-07-13 23:17:17 UTC) #28
lazyboy
mime_handler_view_guest.cc lgtm
4 years, 5 months ago (2016-07-13 23:27:58 UTC) #29
afakhry
https://codereview.chromium.org/2086423005/diff/240001/chrome/browser/devtools/devtools_ui_bindings.cc File chrome/browser/devtools/devtools_ui_bindings.cc (right): https://codereview.chromium.org/2086423005/diff/240001/chrome/browser/devtools/devtools_ui_bindings.cc#newcode47 chrome/browser/devtools/devtools_ui_bindings.cc:47: #include "content/public/browser/invalidate_type.h" On 2016/07/13 23:17:17, Lei Zhang wrote: > ...
4 years, 5 months ago (2016-07-13 23:36:17 UTC) #30
Lei Zhang
https://codereview.chromium.org/2086423005/diff/240001/content/public/browser/web_contents.h File content/public/browser/web_contents.h (right): https://codereview.chromium.org/2086423005/diff/240001/content/public/browser/web_contents.h#newcode322 content/public/browser/web_contents.h:322: // titles for file URLs that have none (so ...
4 years, 5 months ago (2016-07-13 23:44:24 UTC) #31
afakhry
https://codereview.chromium.org/2086423005/diff/240001/content/public/browser/web_contents.h File content/public/browser/web_contents.h (right): https://codereview.chromium.org/2086423005/diff/240001/content/public/browser/web_contents.h#newcode322 content/public/browser/web_contents.h:322: // titles for file URLs that have none (so ...
4 years, 5 months ago (2016-07-14 00:01:53 UTC) #34
Lei Zhang
On 2016/07/14 00:01:53, afakhry wrote: > On 2016/07/13 23:44:24, Lei Zhang wrote: > > Sounds ...
4 years, 5 months ago (2016-07-14 00:06:02 UTC) #35
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/2086423005/280001
4 years, 5 months ago (2016-07-14 13:50:52 UTC) #40
commit-bot: I haz the power
Your CL relies on deprecated CQ feature(s): * Specifying master names in CQ_INCLUDE_TRYBOTS part of ...
4 years, 5 months ago (2016-07-14 13:50:54 UTC) #41
commit-bot: I haz the power
Committed patchset #15 (id:280001)
4 years, 5 months ago (2016-07-14 13:55:30 UTC) #43
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-14 13:55:38 UTC) #44
commit-bot: I haz the power
4 years, 5 months ago (2016-07-14 13:57:31 UTC) #46
Message was sent while issue was closed.
Patchset 15 (id:??) landed as
https://crrev.com/6f0c1ec23bc1eabe221fccdb4b28b1d96273a705
Cr-Commit-Position: refs/heads/master@{#405485}

Powered by Google App Engine
This is Rietveld 408576698