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

Unified Diff: chrome/browser/resources/hotword/page_audio_manager.js

Issue 1011913005: Hotword: Adds a field for always_on_available to the API StatusDetails (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Typo Created 5 years, 9 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
Index: chrome/browser/resources/hotword/page_audio_manager.js
diff --git a/chrome/browser/resources/hotword/page_audio_manager.js b/chrome/browser/resources/hotword/page_audio_manager.js
index 8a67cdaba7be6ed7213ac94c6f9daf7cb670b769..8e9891fdddce360d3e3ffce77542a331b04f0caa 100644
--- a/chrome/browser/resources/hotword/page_audio_manager.js
+++ b/chrome/browser/resources/hotword/page_audio_manager.js
@@ -454,8 +454,10 @@ cr.define('hotword', function() {
statusDone_: function(tab, sendResponse, hotwordStatus) {
var response = {'doNotShowOptinMessage': true};
+ // If always-on is available, then we do not show the promo, as the promo
+ // only works with the sometimes-on pref.
if (!tab.incognito && hotwordStatus.available &&
- !hotwordStatus.enabledSet) {
+ !hotwordStatus.enabledSet && !hotwordStatus.alwaysOnAvailable) {
response = hotwordStatus;
}
« no previous file with comments | « chrome/browser/extensions/api/hotword_private/hotword_private_api.cc ('k') | chrome/common/extensions/api/hotword_private.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698