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

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

Issue 11428149: Alternate NTP: Move bookmark bar to bottom (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address review comments Created 8 years 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.cc
diff --git a/chrome/browser/ui/search/search.cc b/chrome/browser/ui/search/search.cc
index 5a700e4bb374ed6540425f9676972088d5425ebe..19c6e67601286eaf8fefc938b98927dfe03d3264 100644
--- a/chrome/browser/ui/search/search.cc
+++ b/chrome/browser/ui/search/search.cc
@@ -9,15 +9,29 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/chrome_version_info.h"
+namespace {
+
+static bool s_force_instant_extended_api_enabled_for_testing = false;
+
+}
+
namespace chrome {
namespace search {
bool IsInstantExtendedAPIEnabled(const Profile* profile) {
+ if (s_force_instant_extended_api_enabled_for_testing)
+ return true;
+
return VersionInfo::GetChannel() <= VersionInfo::CHANNEL_DEV &&
!profile->IsOffTheRecord() &&
CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableInstantExtendedAPI);
}
+void SetForceInstantExtendedAPIEnabledForTesting(bool force) {
+ s_force_instant_extended_api_enabled_for_testing = force;
+ CHECK(!force || IsInstantExtendedAPIEnabled(NULL));
+}
+
} // namespace search
} // namespace chrome

Powered by Google App Engine
This is Rietveld 408576698