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

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

Issue 554603002: Fix a browser crash on opening 'chrome://voicesearch' in guest mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « chrome/browser/search/hotword_service_factory.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d8a061965324dd2d0c639d501872c3861e660f0e..55b6b15479880038ff8478fd578aa3f93844d878 100644
--- a/chrome/browser/search/hotword_service_factory.cc
+++ b/chrome/browser/search/hotword_service_factory.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/search/hotword_service_factory.h"
#include "base/prefs/pref_service.h"
+#include "chrome/browser/profiles/incognito_helpers.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search/hotword_service.h"
#include "chrome/common/pref_names.h"
@@ -111,6 +112,11 @@ void HotwordServiceFactory::RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
}
+content::BrowserContext* HotwordServiceFactory::GetBrowserContextToUse(
+ content::BrowserContext* context) const {
+ return chrome::GetBrowserContextRedirectedInIncognito(context);
rpetterson 2014/09/08 17:35:01 With this change, this will now return the origina
+}
+
KeyedService* HotwordServiceFactory::BuildServiceInstanceFor(
BrowserContext* context) const {
return new HotwordService(Profile::FromBrowserContext(context));
« no previous file with comments | « chrome/browser/search/hotword_service_factory.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698