diff options
author | rlp@chromium.org <rlp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-06 13:26:49 +0000 |
---|---|---|
committer | rlp@chromium.org <rlp@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-06 13:26:49 +0000 |
commit | 13277911affe5263e119cb4ced5ef87c2950ce34 (patch) | |
tree | d6a4cb0aeafc7164f9bb72e6dc9e00384618dec6 | |
parent | fc40979dcee419dca4dc8e5de8883b29ee88bd4e (diff) | |
download | chromium_src-13277911affe5263e119cb4ced5ef87c2950ce34.zip chromium_src-13277911affe5263e119cb4ced5ef87c2950ce34.tar.gz chromium_src-13277911affe5263e119cb4ced5ef87c2950ce34.tar.bz2 |
[Hotword] Incognito tabs should not display the optin bubble or Say Ok Google UI.
This CL does a check for incognito before injecting and if it's incognito, sends a message back telling it not to show the bubble and then returns, not performing any other hotwording tasks.
BUG=369604
Review URL: https://codereview.chromium.org/268593014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@268502 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/resources/hotword_helper/manager.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome/browser/resources/hotword_helper/manager.js b/chrome/browser/resources/hotword_helper/manager.js index 3fcdb05..815eefd 100644 --- a/chrome/browser/resources/hotword_helper/manager.js +++ b/chrome/browser/resources/hotword_helper/manager.js @@ -58,6 +58,11 @@ OptInManager.CommandFromPage = { */ OptInManager.prototype.injectTab_ = function( tab, sendResponse, hotwordStatus) { + if (tab.incognito) { + sendResponse({'doNotShowOptinMessage': true}); + return; + } + if (!hotwordStatus.available) return; if (hotwordStatus.enabled) |