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

Unified Diff: chrome/browser/search/hotword_service_factory.cc

Issue 136693013: [Hotword] Remove unneeded preferences. Cleaning up look of settings. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: removing a few mroe instances of prefs 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/search/hotword_service_factory.cc
diff --git a/chrome/browser/search/hotword_service_factory.cc b/chrome/browser/search/hotword_service_factory.cc
index 0cc83f826aa804afdce53171557ac1fd25b8bc9b..a8e25f2b5269c4706d95606b83139d2633f733a7 100644
--- a/chrome/browser/search/hotword_service_factory.cc
+++ b/chrome/browser/search/hotword_service_factory.cc
@@ -14,11 +14,9 @@
// static
HotwordService* HotwordServiceFactory::GetForProfile(Profile* profile) {
- if (!profile ||
+ if (!profile || profile->IsOffTheRecord() ||
James Hawkins 2014/01/24 22:50:49 Is this right? It seems like the IsOffTheRecord s
rpetterson 2014/01/25 00:29:22 Technically speaking GetServiceForBrowserContext s
James Hawkins 2014/01/27 18:14:37 Yeah, I think it may be safer to let GetServiceFor
samarth 2014/01/27 18:24:53 Just so I understand correctly, this change is int
rpetterson 2014/01/27 19:28:13 I've pulled out this check. And yes, this change
samarth 2014/01/27 19:50:16 Oh, that's different from what I thought. I thoug
(profile->GetPrefs()->HasPrefPath(prefs::kHotwordSearchEnabled) &&
- !profile->GetPrefs()->GetBoolean(prefs::kHotwordSearchEnabled)) ||
- (profile->IsOffTheRecord() &&
- !profile->GetPrefs()->GetBoolean(prefs::kHotwordSearchIncognitoEnabled)))
+ !profile->GetPrefs()->GetBoolean(prefs::kHotwordSearchEnabled)))
return NULL;
return static_cast<HotwordService*>(
@@ -51,20 +49,9 @@ void HotwordServiceFactory::RegisterProfilePrefs(
prefs->RegisterBooleanPref(prefs::kHotwordSearchEnabled,
false,
user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
- prefs->RegisterBooleanPref(prefs::kHotwordSearchIncognitoEnabled,
- false,
- user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
prefs->RegisterIntegerPref(prefs::kHotwordOptInPopupTimesShown,
0,
user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
- prefs->RegisterBooleanPref(prefs::kHotwordSearchTimeoutEnabled,
- true,
- user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
-}
-
-content::BrowserContext* HotwordServiceFactory::GetBrowserContextToUse(
- content::BrowserContext* context) const {
- return chrome::GetBrowserContextOwnInstanceInIncognito(context);
}
BrowserContextKeyedService* HotwordServiceFactory::BuildServiceInstanceFor(
« no previous file with comments | « chrome/browser/search/hotword_service_factory.h ('k') | chrome/browser/ui/webui/options/browser_options_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698