Commit d30f443a authored by Kyle Milka's avatar Kyle Milka Committed by Commit Bot

[NTP] Remove flag for voice search on local ntp

The flag was enabled by default and no longer needed.

Bug: 885301
Change-Id: I84ec4557a1ca4c2f1eb70213c7bc56cd67512611
Reviewed-on: https://chromium-review.googlesource.com/1236287
Commit-Queue: Kyle Milka <kmilka@chromium.org>
Reviewed-by: default avatarKristi Park <kristipark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#593248}
parent 60d7f052
......@@ -3553,12 +3553,6 @@ const FeatureEntry kFeatureEntries[] = {
FEATURE_VALUE_TYPE(chrome::android::kPwaPersistentNotification)},
#endif // OS_ANDROID
#if !defined(OS_ANDROID)
{"voice-search-on-local-ntp", flag_descriptions::kVoiceSearchOnLocalNtpName,
flag_descriptions::kVoiceSearchOnLocalNtpDescription, kOsDesktop,
FEATURE_VALUE_TYPE(features::kVoiceSearchOnLocalNtp)},
#endif // !defined(OS_ANDROID)
{"click-to-open-pdf", flag_descriptions::kClickToOpenPDFName,
flag_descriptions::kClickToOpenPDFDescription, kOsAll,
FEATURE_VALUE_TYPE(features::kClickToOpenPDFPlaceholder)},
......
......@@ -2851,12 +2851,6 @@ const char kUseGoogleLocalNtpName[] = "Enable using the Google local NTP";
const char kUseGoogleLocalNtpDescription[] =
"Use the local New Tab page if Google is the default search engine.";
const char kVoiceSearchOnLocalNtpName[] =
"Enable Voice Search on the local NTP";
const char kVoiceSearchOnLocalNtpDescription[] =
"Show a microphone for voice search on the local New Tab page "
"if Google is the default search engine.";
#if defined(GOOGLE_CHROME_BUILD)
const char kGoogleBrandedContextMenuName[] =
......
......@@ -1715,9 +1715,6 @@ extern const char kSiteCharacteristicsDatabaseDescription[];
extern const char kUseGoogleLocalNtpName[];
extern const char kUseGoogleLocalNtpDescription[];
extern const char kVoiceSearchOnLocalNtpName[];
extern const char kVoiceSearchOnLocalNtpDescription[];
#if defined(GOOGLE_CHROME_BUILD)
extern const char kGoogleBrandedContextMenuName[];
......
......@@ -29,7 +29,7 @@ var onDdllogResponse = null;
* raciness in the creation/destruction of the iframe. crbug.com/786313.
* @type {boolean}
*/
let iframesDisabledForTesting = false;
let iframesAndVoiceSearchDisabledForTesting = false;
/**
......@@ -44,8 +44,8 @@ function LocalNTP() {
* Called by tests to disable the creation of Most Visited and edit custom link
* iframes.
*/
function disableIframesForTesting() {
iframesDisabledForTesting = true;
function disableIframesAndVoiceSearchForTesting() {
iframesAndVoiceSearchDisabledForTesting = true;
}
......@@ -1112,7 +1112,7 @@ function init() {
$(IDS.FAKEBOX_TEXT).textContent =
configData.translatedStrings.searchboxPlaceholder;
if (configData.isVoiceSearchEnabled) {
if (!iframesAndVoiceSearchDisabledForTesting) {
speech.init(
configData.googleBaseUrl, configData.translatedStrings,
$(IDS.FAKEBOX_MICROPHONE), searchboxApiHandle);
......@@ -1215,7 +1215,7 @@ function init() {
document.documentElement.classList.add(CLASSES.RTL);
}
if (!iframesDisabledForTesting) {
if (!iframesAndVoiceSearchDisabledForTesting) {
createIframes();
}
......@@ -1690,7 +1690,7 @@ var applyDoodleMetadata = function() {
return {
init: init, // Exposed for testing.
listen: listen,
disableIframesForTesting: disableIframesForTesting
disableIframesAndVoiceSearchForTesting: disableIframesAndVoiceSearchForTesting
};
}
......
......@@ -507,10 +507,6 @@ class LocalNtpSource::SearchConfigurationProvider
content::BrowserAccessibilityState::GetInstance()
->IsAccessibleBrowser());
bool is_voice_search_enabled =
base::FeatureList::IsEnabled(features::kVoiceSearchOnLocalNtp);
config_data.SetBoolean("isVoiceSearchEnabled", is_voice_search_enabled);
config_data.SetBoolean("isMDUIEnabled", features::IsMDUIEnabled());
config_data.SetBoolean("isMDIconsEnabled", features::IsMDIconsEnabled());
......
......@@ -31,8 +31,7 @@ class LocalNTPVoiceSearchSmokeTest : public InProcessBrowserTest {
private:
void SetUp() override {
feature_list_.InitWithFeatures(
{features::kUseGoogleLocalNtp, features::kVoiceSearchOnLocalNtp}, {});
feature_list_.InitWithFeatures({features::kUseGoogleLocalNtp}, {});
InProcessBrowserTest::SetUp();
}
......
......@@ -595,12 +595,6 @@ const base::Feature kUserActivityPrediction{"UserActivityPrediction",
const base::Feature kUseSameCacheForMedia{"UseSameCacheForMedia",
base::FEATURE_DISABLED_BY_DEFAULT};
#if !defined(OS_ANDROID)
// Enables or disables Voice Search on the local NTP.
const base::Feature kVoiceSearchOnLocalNtp{"VoiceSearchOnLocalNtp",
base::FEATURE_ENABLED_BY_DEFAULT};
#endif
#if defined(OS_CHROMEOS)
// Enables support of libcups APIs from ARC
const base::Feature kArcCupsApi{"ArcCupsApi",
......
......@@ -397,11 +397,6 @@ extern const base::Feature kUserActivityPrediction;
COMPONENT_EXPORT(CHROME_FEATURES)
extern const base::Feature kUseSameCacheForMedia;
#if !defined(OS_ANDROID)
COMPONENT_EXPORT(CHROME_FEATURES)
extern const base::Feature kVoiceSearchOnLocalNtp;
#endif
#if defined(OS_CHROMEOS)
COMPONENT_EXPORT(CHROME_FEATURES) extern const base::Feature kArcCupsApi;
......
......@@ -197,7 +197,7 @@ function elementIsVisible(elem) {
function initLocalNTP(isGooglePage) {
configData.isGooglePage = isGooglePage;
var localNTP = LocalNTP();
localNTP.disableIframesForTesting();
localNTP.disableIframesAndVoiceSearchForTesting();
localNTP.init();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment