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

Unified Diff: chrome/browser/search/search.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 tests Created 7 years, 8 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 | « no previous file | chrome/browser/search/search_unittest.cc » ('j') | chrome/browser/search/search_unittest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/search/search.cc
diff --git a/chrome/browser/search/search.cc b/chrome/browser/search/search.cc
index 12bc7c6f7a783154d8280f0a295c2701b45d7155..347a1e5028eb4675d5ae1f0e7770ee5034e1a55b 100644
--- a/chrome/browser/search/search.cc
+++ b/chrome/browser/search/search.cc
@@ -160,8 +160,7 @@ bool IsInstantURL(const GURL& url, Profile* profile) {
GURL effective_url = url;
if (IsCommandLineInstantURL(url))
- effective_url = CoerceCommandLineURLToTemplateURL(url, instant_url_ref,
- kDisableStartMargin);
+ return true;
sreeram 2013/05/03 23:17:31 This bypasses the secure & espv checks. I understa
David Black 2013/05/04 00:49:23 As discussed in person, I maintain the logic here
if (!effective_url.is_valid())
return false;
@@ -479,11 +478,12 @@ bool ShouldPreferRemoteNTPOnStartup() {
// precedence and allows the trial to not be reported (if it's never queried).
const CommandLine* command_line = CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(switches::kDisableInstantExtendedAPI) ||
- command_line->HasSwitch(switches::kEnableInstantExtendedAPI) ||
command_line->HasSwitch(switches::kEnableLocalOnlyInstantExtendedAPI) ||
- command_line->HasSwitch(switches::kDisableLocalOnlyInstantExtendedAPI)) {
+ command_line->HasSwitch(switches::kDisableLocalFirstLoadNTP)) {
return false;
}
+ if (command_line->HasSwitch(switches::kEnableLocalFirstLoadNTP))
+ return true;
sreeram 2013/05/03 23:17:31 This is inverted. kEnableLocalFirstLoadNTP should
David Black 2013/05/04 00:49:23 Whoops. Fixed.
FieldTrialFlags flags;
if (GetFieldTrialInfo(
« no previous file with comments | « no previous file | chrome/browser/search/search_unittest.cc » ('j') | chrome/browser/search/search_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698