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

Side by Side Diff: chrome/browser/search/hotword_service_factory.cc

Issue 460113005: Adds the audio history and always on hotwording settings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed errors Created 6 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/search/hotword_service_factory.h" 5 #include "chrome/browser/search/hotword_service_factory.h"
6 6
7 #include "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/search/hotword_service.h" 9 #include "chrome/browser/search/hotword_service.h"
10 #include "chrome/common/pref_names.h" 10 #include "chrome/common/pref_names.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 // state will be updated very soon and call OnUpdateAudioDevices. 91 // state will be updated very soon and call OnUpdateAudioDevices.
92 OnUpdateAudioDevices(devices); 92 OnUpdateAudioDevices(devices);
93 } 93 }
94 94
95 void HotwordServiceFactory::RegisterProfilePrefs( 95 void HotwordServiceFactory::RegisterProfilePrefs(
96 user_prefs::PrefRegistrySyncable* prefs) { 96 user_prefs::PrefRegistrySyncable* prefs) {
97 prefs->RegisterBooleanPref(prefs::kHotwordSearchEnabled, 97 prefs->RegisterBooleanPref(prefs::kHotwordSearchEnabled,
98 false, 98 false,
99 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 99 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
100 // Although this is default true, users will not send back information to 100 // Although this is default true, users will not send back information to
101 // Google unless they have opted in to Hotwording at which point they must 101 // Google unless they have opted into Hotwording at which point they must
102 // also confirm that they wish this preference to be true or opt out of it. 102 // also confirm that they wish this preference to be true or opt out of it.
103 prefs->RegisterBooleanPref(prefs::kHotwordAudioLoggingEnabled, 103 prefs->RegisterBooleanPref(prefs::kHotwordAudioLoggingEnabled,
104 true, 104 true,
105 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 105 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
106 prefs->RegisterStringPref(prefs::kHotwordPreviousLanguage, 106 prefs->RegisterStringPref(prefs::kHotwordPreviousLanguage,
107 std::string(), 107 std::string(),
108 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); 108 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
109 prefs->RegisterBooleanPref(prefs::kHotwordAlwaysOnSearchEnabled,
Matt Giuca 2014/08/12 08:37:39 Does not compile without OS_CHROMEOS. Should be gu
kcarattini 2014/08/13 03:51:53 Acknowledged.
110 false,
111 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
109 } 112 }
110 113
111 KeyedService* HotwordServiceFactory::BuildServiceInstanceFor( 114 KeyedService* HotwordServiceFactory::BuildServiceInstanceFor(
112 BrowserContext* context) const { 115 BrowserContext* context) const {
113 return new HotwordService(Profile::FromBrowserContext(context)); 116 return new HotwordService(Profile::FromBrowserContext(context));
114 } 117 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698