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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 in to 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, |
| 107 std::string(), |
| 108 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
106 } | 109 } |
107 | 110 |
108 KeyedService* HotwordServiceFactory::BuildServiceInstanceFor( | 111 KeyedService* HotwordServiceFactory::BuildServiceInstanceFor( |
109 BrowserContext* context) const { | 112 BrowserContext* context) const { |
110 return new HotwordService(Profile::FromBrowserContext(context)); | 113 return new HotwordService(Profile::FromBrowserContext(context)); |
111 } | 114 } |
OLD | NEW |