OLD | NEW |
---|---|
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 Loading... | |
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 |
James Hawkins
2014/08/13 14:16:55
Technically this was more correct as 'in to', sinc
kcarattini
2014/08/14 01:34:02
Done.
| |
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, | |
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 } |
OLD | NEW |