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

Unified Diff: chrome/browser/task_management/providers/web_contents/web_contents_task_provider.cc

Issue 2086423005: Using WebContents::UpdateTitleForEntry() instead of NavigationEntry::SetTitle() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Improving comment and removing the NOTREACHED. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/media/tab_desktop_media_list_unittest.cc ('k') | chrome/browser/ui/browser_commands.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/task_management/providers/web_contents/web_contents_task_provider.cc
diff --git a/chrome/browser/task_management/providers/web_contents/web_contents_task_provider.cc b/chrome/browser/task_management/providers/web_contents/web_contents_task_provider.cc
index f6862a33f3dd7e1330d7d9d3df792f75de86e2c4..452ce24252e3bf0441531f8d4fd4c4948fdb3e18 100644
--- a/chrome/browser/task_management/providers/web_contents/web_contents_task_provider.cc
+++ b/chrome/browser/task_management/providers/web_contents/web_contents_task_provider.cc
@@ -177,11 +177,8 @@ void WebContentsEntry::DidNavigateMainFrame(
const content::LoadCommittedDetails& details,
const content::FrameNavigateParams& params) {
auto itr = tasks_by_frames_.find(web_contents()->GetMainFrame());
- if (itr == tasks_by_frames_.end()) {
- // TODO(afakhry): Validate whether this actually happens in practice.
- NOTREACHED();
afakhry 2016/07/14 00:01:53 Note the removal of these NOTREACHED()s had to be
+ if (itr == tasks_by_frames_.end())
return;
- }
// Listening to WebContentsObserver::TitleWasSet() only is not enough in
// some cases when the the webpage doesn't have a title. That's why we update
@@ -199,11 +196,8 @@ void WebContentsEntry::DidNavigateMainFrame(
void WebContentsEntry::TitleWasSet(content::NavigationEntry* entry,
bool explicit_set) {
auto itr = tasks_by_frames_.find(web_contents()->GetMainFrame());
- if (itr == tasks_by_frames_.end()) {
- // TODO(afakhry): Validate whether this actually happens in practice.
- NOTREACHED();
+ if (itr == tasks_by_frames_.end())
return;
- }
itr->second->UpdateTitle();
}
« no previous file with comments | « chrome/browser/media/tab_desktop_media_list_unittest.cc ('k') | chrome/browser/ui/browser_commands.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698