Index: chrome/browser/resources/hotword_helper/optin_client.js |
diff --git a/chrome/browser/resources/hotword_helper/optin_client.js b/chrome/browser/resources/hotword_helper/optin_client.js |
index a688df76b9eb30159037a66f81eaa7ad2005976c..6eccdb1475ee1615c40941ae608a4dd3cc058f9d 100644 |
--- a/chrome/browser/resources/hotword_helper/optin_client.js |
+++ b/chrome/browser/resources/hotword_helper/optin_client.js |
@@ -35,7 +35,11 @@ OptInClient.CommandFromPage = { |
// User has explicitly clicked 'no'. |
CLICKED_NO_OPTIN: 'hcno', |
// User has opted in. |
- CLICKED_OPTIN: 'hco' |
+ CLICKED_OPTIN: 'hco', |
+ // Audio logging is opted in. |
+ AUDIO_LOGGING_ON: 'alon', |
+ // Audio logging is opted out. |
+ AUDIO_LOGGING_OFF: 'aloff', |
}; |
@@ -49,7 +53,8 @@ OptInClient.EXISTS_ = 'chwoihe'; |
/** |
* Handles the messages posted to the window, mainly listening for |
- * the optin and no optin clicks. |
+ * the optin and no optin clicks. Also listening for preference on |
+ * audio logging. |
* @param {!MessageEvent} messageEvent Message event from the window. |
* @private |
*/ |
@@ -65,6 +70,14 @@ OptInClient.prototype.handleCommandFromPage_ = function(messageEvent) { |
chrome.runtime.sendMessage( |
{'type': command}); |
break; |
+ case OptInClient.CommandFromPage.AUDIO_LOGGING_ON: |
+ chrome.runtime.sendMessage( |
+ {'type': command}); |
+ break; |
+ case OptInClient.CommandFromPage.AUDIO_LOGGING_OFF: |
+ chrome.runtime.sendMessage( |
+ {'type': command}); |
saurya1
2014/03/27 16:29:22
If you want to clean this up you can just remove t
rpetterson
2014/03/27 16:37:19
I assume I don't actually need the switch statemen
|
+ break; |
} |
} |
}; |