| 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/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
| 9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/browser/search/hotword_service.h" | 10 #include "chrome/browser/search/hotword_service.h" |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 | 77 |
| 78 void HotwordServiceFactory::RegisterProfilePrefs( | 78 void HotwordServiceFactory::RegisterProfilePrefs( |
| 79 user_prefs::PrefRegistrySyncable* prefs) { | 79 user_prefs::PrefRegistrySyncable* prefs) { |
| 80 prefs->RegisterBooleanPref(prefs::kHotwordAudioLoggingEnabled, | 80 prefs->RegisterBooleanPref(prefs::kHotwordAudioLoggingEnabled, |
| 81 false, | 81 false, |
| 82 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 82 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
| 83 prefs->RegisterStringPref(prefs::kHotwordPreviousLanguage, | 83 prefs->RegisterStringPref(prefs::kHotwordPreviousLanguage, |
| 84 std::string(), | 84 std::string(), |
| 85 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 85 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
| 86 // Per-device settings (do not sync). | 86 // Per-device settings (do not sync). |
| 87 prefs->RegisterBooleanPref(prefs::kHotwordSearchEnabled, | 87 prefs->RegisterBooleanPref(prefs::kHotwordSearchEnabled, false); |
| 88 false, | 88 prefs->RegisterBooleanPref(prefs::kHotwordAlwaysOnSearchEnabled, false); |
| 89 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 89 prefs->RegisterBooleanPref(prefs::kHotwordAlwaysOnNotificationSeen, false); |
| 90 prefs->RegisterBooleanPref(prefs::kHotwordAlwaysOnSearchEnabled, | |
| 91 false, | |
| 92 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | |
| 93 prefs->RegisterBooleanPref(prefs::kHotwordAlwaysOnNotificationSeen, | |
| 94 false, | |
| 95 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | |
| 96 } | 90 } |
| 97 | 91 |
| 98 KeyedService* HotwordServiceFactory::BuildServiceInstanceFor( | 92 KeyedService* HotwordServiceFactory::BuildServiceInstanceFor( |
| 99 BrowserContext* context) const { | 93 BrowserContext* context) const { |
| 100 return new HotwordService(Profile::FromBrowserContext(context)); | 94 return new HotwordService(Profile::FromBrowserContext(context)); |
| 101 } | 95 } |
| OLD | NEW |