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

Unified Diff: chrome/browser/search/hotword_service.h

Issue 528113003: Hotword Audio Verification App: Adds to hotwordPrivate API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@page-one
Patch Set: Created 6 years, 3 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/search/hotword_service.h
diff --git a/chrome/browser/search/hotword_service.h b/chrome/browser/search/hotword_service.h
index c871684914afe3c20f7e257e368548e21c7edfd6..ba8dd3a6018cc44e6fb802e2a46f5db065595826 100644
--- a/chrome/browser/search/hotword_service.h
+++ b/chrome/browser/search/hotword_service.h
@@ -110,6 +110,23 @@ class HotwordService : public content::NotificationObserver,
// no error.
int error_message() { return error_message_; }
+ // These methods are for getting and setting the launch Mode of the
+ // Hotword Audio Verification App. The app needs to know the state of the
+ // Audio History and Hotword settings in order to know which opt-in flow
+ // to use.
+ //
+ // TODO(kcarattini): Remove this when
+ // https://code.google.com/p/chromium/issues/detail?id=165573 is fixed,
+ // at which time we can simply launch the app in the given mode instead of
+ // having to check for it here.
+ enum LaunchMode {
+ AUDIO_HISTORY_ONLY,
+ HOTWORD_ONLY,
+ HOTWORD_AND_AUDIO_HISTORY
+ };
+ void SetHotwordAudioVerificationLaunchState(const std::string& pref_name);
+ LaunchMode GetHotwordAudioVerificationLaunchState();
+
private:
Profile* profile_;
@@ -130,6 +147,9 @@ class HotwordService : public content::NotificationObserver,
base::WeakPtrFactory<HotwordService> weak_factory_;
+ // Stores a bit of state for the Hotword Audio Verification App.
benwells 2014/09/09 20:57:31 Super nit: a bit? Meaning 0 or 1?
kcarattini 2014/09/10 08:14:28 Done.
+ LaunchMode hotword_audio_verification_launch_state_;
+
DISALLOW_COPY_AND_ASSIGN(HotwordService);
};

Powered by Google App Engine
This is Rietveld 408576698