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

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: adding a line. maybe it will help? 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 user_prefs::PrefRegistrySyncable* prefs) { 50 user_prefs::PrefRegistrySyncable* prefs) {
51 prefs->RegisterBooleanPref(prefs::kHotwordSearchEnabled, 51 prefs->RegisterBooleanPref(prefs::kHotwordSearchEnabled,
52 false, 52 false,
53 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 53 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
54 prefs->RegisterBooleanPref(prefs::kHotwordSearchIncognitoEnabled, 54 prefs->RegisterBooleanPref(prefs::kHotwordSearchIncognitoEnabled,
55 false, 55 false,
56 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 56 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
57 prefs->RegisterIntegerPref(prefs::kHotwordOptInPopupTimesShown, 57 prefs->RegisterIntegerPref(prefs::kHotwordOptInPopupTimesShown,
58 0, 58 0,
59 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); 59 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
60 prefs->RegisterBooleanPref(prefs::kHotwordSearchTimeoutEnabled,
61 true,
62 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
60 } 63 }
61 64
62 content::BrowserContext* HotwordServiceFactory::GetBrowserContextToUse( 65 content::BrowserContext* HotwordServiceFactory::GetBrowserContextToUse(
63 content::BrowserContext* context) const { 66 content::BrowserContext* context) const {
64 return chrome::GetBrowserContextOwnInstanceInIncognito(context); 67 return chrome::GetBrowserContextOwnInstanceInIncognito(context);
65 } 68 }
66 69
67 BrowserContextKeyedService* HotwordServiceFactory::BuildServiceInstanceFor( 70 BrowserContextKeyedService* HotwordServiceFactory::BuildServiceInstanceFor(
68 content::BrowserContext* profile) const { 71 content::BrowserContext* profile) const {
69 return new HotwordService(static_cast<Profile*>(profile)); 72 return new HotwordService(static_cast<Profile*>(profile));
70 } 73 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/browser_options.js ('k') | chrome/browser/ui/webui/options/browser_options_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698