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 |