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

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

Issue 11824050: InstantExtended: Committed NTP (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup. Created 7 years, 11 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
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 1222b70056d0938f2e31524de141bbd512dbaadd..859c6af94a57d4a680d79231e2b7f26656df727e 100644
--- a/chrome/browser/ui/search/search_tab_helper.cc
+++ b/chrome/browser/ui/search/search_tab_helper.cc
@@ -99,11 +99,12 @@ void SearchTabHelper::NavigateToPendingEntry(
if (!is_search_enabled_)
return;
- // NTP mode changes are initiated at "pending", all others are initiated
- // when "committed". This is because NTP is rendered natively so is faster
- // to render than the web contents and we need to coordinate the animations.
- if (IsNTP(url))
- UpdateModelBasedOnURL(url);
+// TODO(samarth): check with Kuan that this is safe to remove.
dhollowa 2013/01/10 18:50:29 I expect this is ok, but you'll need to change lin
samarth 2013/01/11 19:43:05 Done (I assume you meant line 118?). I've sent an
+// // NTP mode changes are initiated at "pending", all others are initiated
+// // when "committed". This is because NTP is rendered natively so is faster
+// // to render than the web contents and we need to coordinate the animations.
+// if (IsNTP(url))
+// UpdateModelBasedOnURL(url);
}
void SearchTabHelper::Observe(
@@ -114,9 +115,8 @@ void SearchTabHelper::Observe(
content::LoadCommittedDetails* committed_details =
content::Details<content::LoadCommittedDetails>(details).ptr();
// See comment in |NavigateToPendingEntry()| about why |!IsNTP()| is used.
- if (!IsNTP(committed_details->entry->GetURL())) {
- UpdateModelBasedOnURL(committed_details->entry->GetURL());
- }
+ if (!IsNTP(committed_details->entry->GetVirtualURL()))
+ UpdateModelBasedOnURL(committed_details->entry->GetVirtualURL());
}
void SearchTabHelper::UpdateModelBasedOnURL(const GURL& url) {

Powered by Google App Engine
This is Rietveld 408576698