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

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: Updates from nasko comments 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();
Charlie Reis 2013/11/12 01:09:29 @sreeram: I see you specifically used GetVisibleEn
sreeram 2013/11/12 09:01:26 Based on the call sites below (i.e., where IsCache
jww 2013/11/12 22:32:50 Done.
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();
samarth 2013/11/12 15:55:07 Just to confirm, this will be the entry that "trig
jww 2013/11/12 22:32:50 creis should confirm, but yes.
Charlie Reis 2013/11/13 18:40:03 Yes, this is the entry that just committed as part
if (entry && entry->GetTitle().empty() &&
(entry->GetVirtualURL() == GURL(chrome::kChromeUINewTabURL) ||
chrome::NavEntryIsInstantNTP(web_contents_, entry))) {

Powered by Google App Engine
This is Rietveld 408576698