Chromium Code Reviews| 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( |