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

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

Issue 134103005: [Hotword] Putting preferences under search for hotword service. Putting behind a flag. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: add flag and cleanup Created 6 years, 11 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/incognito_helpers.h" 8 #include "chrome/browser/profiles/incognito_helpers.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 28 matching lines...) Expand all
39 } 39 }
40 40
41 void HotwordServiceFactory::RegisterProfilePrefs( 41 void HotwordServiceFactory::RegisterProfilePrefs(
42 user_prefs::PrefRegistrySyncable* prefs) { 42 user_prefs::PrefRegistrySyncable* prefs) {
43 prefs->RegisterBooleanPref(prefs::kHotwordSearchEnabled, 43 prefs->RegisterBooleanPref(prefs::kHotwordSearchEnabled,
44 false, 44 false,
45 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 45 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
46 prefs->RegisterBooleanPref(prefs::kHotwordSearchIncognitoEnabled, 46 prefs->RegisterBooleanPref(prefs::kHotwordSearchIncognitoEnabled,
47 false, 47 false,
48 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 48 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
49 prefs->RegisterBooleanPref(prefs::kHotwordSearchTimeoutEnabled,
50 true,
51 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
49 } 52 }
50 53
51 content::BrowserContext* HotwordServiceFactory::GetBrowserContextToUse( 54 content::BrowserContext* HotwordServiceFactory::GetBrowserContextToUse(
52 content::BrowserContext* context) const { 55 content::BrowserContext* context) const {
53 return chrome::GetBrowserContextOwnInstanceInIncognito(context); 56 return chrome::GetBrowserContextOwnInstanceInIncognito(context);
54 } 57 }
55 58
56 BrowserContextKeyedService* HotwordServiceFactory::BuildServiceInstanceFor( 59 BrowserContextKeyedService* HotwordServiceFactory::BuildServiceInstanceFor(
57 content::BrowserContext* profile) const { 60 content::BrowserContext* profile) const {
58 return new HotwordService(static_cast<Profile*>(profile)); 61 return new HotwordService(static_cast<Profile*>(profile));
59 } 62 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698