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

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

Issue 196753002: [Hotword] Making enabling/disabling the setting enable/disable the hotword extension. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: undo profile resetter unittest change, but modify behavior when disabling extensions Created 6 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/search/hotword_service.h
diff --git a/chrome/browser/search/hotword_service.h b/chrome/browser/search/hotword_service.h
index f17bee910fdc679ed1a7823f5718466c35492dd0..7db1f55f71d482b9aa3c48d16de303b008cf44ec 100644
--- a/chrome/browser/search/hotword_service.h
+++ b/chrome/browser/search/hotword_service.h
@@ -6,6 +6,7 @@
#define CHROME_BROWSER_SEARCH_HOTWORD_SERVICE_H_
#include "base/basictypes.h"
+#include "base/prefs/pref_change_registrar.h"
#include "components/keyed_service/core/keyed_service.h"
class Profile;
@@ -50,9 +51,19 @@ class HotwordService : public KeyedService {
// already loaded successfully by some other means.
virtual bool RetryHotwordExtension();
+ // Control the state of the hotword extension.
+ void DisableHotwordExtension();
+ void EnableHotwordExtension();
miket_OOO 2014/03/17 20:10:51 Teeny nit: Enable usually comes first in the pair.
rpetterson 2014/03/17 21:14:29 Done.
+
+ // Handles enabling/disabling the hotword extension when the user
+ // turns it off via the settings menu.
+ void OnHotwordSearchEnabledChanged(const std::string& pref_name);
+
private:
Profile* profile_;
+ PrefChangeRegistrar pref_registrar_;
+
DISALLOW_COPY_AND_ASSIGN(HotwordService);
};

Powered by Google App Engine
This is Rietveld 408576698