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

Unified Diff: chrome/browser/ui/search/search_tab_helper.cc

Issue 66993003: Most references to GetActiveEntry removed from chrome/browser/ui. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase on ToT Created 7 years, 1 month 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
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 f9dc05ab7aa66c532cda80c252c5574a2a9a96fd..255f211842eda1c5746089b3f8017cf4554a9fb8 100644
--- a/chrome/browser/ui/search/search_tab_helper.cc
+++ b/chrome/browser/ui/search/search_tab_helper.cc
@@ -69,7 +69,7 @@ void RecordCacheableNTPLoadHistogram(bool succeeded) {
bool IsCacheableNTP(const content::WebContents* contents) {
const content::NavigationEntry* entry =
- contents->GetController().GetActiveEntry();
+ contents->GetController().GetLastCommittedEntry();
return chrome::ShouldUseCacheableNTP() &&
chrome::NavEntryIsInstantNTP(contents, entry) &&
entry->GetURL() != GURL(chrome::kChromeSearchLocalNtpUrl);
@@ -304,7 +304,7 @@ void SearchTabHelper::DidNavigateMainFrame(
// also a race condition between this code and the page's SetTitle call which
// this rule avoids.
content::NavigationEntry* entry =
- web_contents_->GetController().GetActiveEntry();
+ web_contents_->GetController().GetLastCommittedEntry();
if (entry && entry->GetTitle().empty() &&
(entry->GetVirtualURL() == GURL(chrome::kChromeUINewTabURL) ||
chrome::NavEntryIsInstantNTP(web_contents_, entry))) {

Powered by Google App Engine
This is Rietveld 408576698