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

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

Issue 14043009: Fall back to local page if online NTP fails to load. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix failing unittest & address comments Created 7 years, 7 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
« no previous file with comments | « chrome/browser/ui/search/instant_tab.h ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/search/instant_tab.cc
diff --git a/chrome/browser/ui/search/instant_tab.cc b/chrome/browser/ui/search/instant_tab.cc
index 0d1ab82076d4b4919cc98004016fc8ddd0c19ffc..d92688a9ec5146523d65b96a44f7d038fd4461af 100644
--- a/chrome/browser/ui/search/instant_tab.cc
+++ b/chrome/browser/ui/search/instant_tab.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "chrome/browser/ui/search/instant_tab.h"
+#include "content/public/browser/web_contents.h"
InstantTab::InstantTab(InstantPage::Delegate* delegate)
: InstantPage(delegate, "") {
@@ -13,7 +14,12 @@ InstantTab::~InstantTab() {
void InstantTab::Init(content::WebContents* contents) {
SetContents(contents);
- DetermineIfPageSupportsInstant();
+ if (!contents->IsWaitingForResponse())
+ DetermineIfPageSupportsInstant();
+}
+
+bool InstantTab::ShouldProcessAboutToNavigateMainFrame() {
+ return true;
}
bool InstantTab::ShouldProcessSetSuggestions() {
« no previous file with comments | « chrome/browser/ui/search/instant_tab.h ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698