summaryrefslogtreecommitdiffstats
path: root/chrome/browser/dom_ui
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/dom_ui')
-rw-r--r--chrome/browser/dom_ui/new_tab_ui.cc12
-rw-r--r--chrome/browser/dom_ui/new_tab_ui.h2
2 files changed, 4 insertions, 10 deletions
diff --git a/chrome/browser/dom_ui/new_tab_ui.cc b/chrome/browser/dom_ui/new_tab_ui.cc
index b5cdf52..3d0cdf1 100644
--- a/chrome/browser/dom_ui/new_tab_ui.cc
+++ b/chrome/browser/dom_ui/new_tab_ui.cc
@@ -797,15 +797,9 @@ void NewTabUIContents::AttachMessageHandlers() {
}
}
-bool NewTabUIContents::Navigate(const NavigationEntry& entry, bool reload) {
- const bool result = WebContents::Navigate(entry, reload);
-
- // Force the title to say 'New tab', even when loading. The supplied entry is
- // also the pending entry.
- NavigationEntry* pending_entry = controller()->GetPendingEntry();
- DCHECK(pending_entry && pending_entry == &entry);
- pending_entry->set_title(forced_title_);
-
+bool NewTabUIContents::NavigateToPendingEntry(bool reload) {
+ const bool result = WebContents::NavigateToPendingEntry(reload);
+ controller()->GetPendingEntry()->set_title(forced_title_);
return result;
}
diff --git a/chrome/browser/dom_ui/new_tab_ui.h b/chrome/browser/dom_ui/new_tab_ui.h
index 3584954..092cdb4 100644
--- a/chrome/browser/dom_ui/new_tab_ui.h
+++ b/chrome/browser/dom_ui/new_tab_ui.h
@@ -290,7 +290,7 @@ class NewTabUIContents : public DOMUIHost {
// WebContents overrides.
// Overriden to force the title of the page to forced_title_.
- virtual bool Navigate(const NavigationEntry& entry, bool reload);
+ virtual bool NavigateToPendingEntry(bool reload);
// We don't want a favicon on the new tab page.
virtual bool ShouldDisplayFavIcon() { return false; }
// The bookmark bar is always visible on the new tab.