Chromium Code Reviews| Index: chrome/browser/ui/search/search_tab_helper.cc |
| diff --git a/chrome/browser/ui/search/search_tab_helper.cc b/chrome/browser/ui/search/search_tab_helper.cc |
| index 5c72d74486fad8987f07a02a0b398769df274c4a..cc33ac3ed92b7f308ac02a58bff6c8078f0b6d35 100644 |
| --- a/chrome/browser/ui/search/search_tab_helper.cc |
| +++ b/chrome/browser/ui/search/search_tab_helper.cc |
| @@ -221,6 +221,19 @@ void SearchTabHelper::RenderViewCreated( |
| ipc_router_.SetPromoInformation(IsAppLauncherEnabled()); |
| } |
| +void SearchTabHelper::NavigateToPendingEntry( |
| + const GURL& url, |
| + content::NavigationController::ReloadType /* reload_type */) { |
| + // Set the title on any pending entry corresponding to the NTP. This prevents |
| + // any flickering of the tab title. |
| + if (chrome::IsNTPURL(url, profile())) { |
|
Charlie Reis
2013/11/22 23:19:12
Is this just a sanity check, or is this called on
samarth
2013/11/25 15:32:13
Called on every navigation.
|
| + content::NavigationEntry* entry = |
| + web_contents_->GetController().GetVisibleEntry(); |
| + if (entry) |
| + entry->SetTitle(l10n_util::GetStringUTF16(IDS_NEW_TAB_TITLE)); |
| + } |
| +} |
| + |
| void SearchTabHelper::DidNavigateMainFrame( |
| const content::LoadCommittedDetails& details, |
| const content::FrameNavigateParams& params) { |