Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / apps / app_keep_alive_service_factory.cc
index dc9e725..5afe050 100644 (file)
@@ -6,9 +6,9 @@
 
 #include "apps/app_keep_alive_service.h"
 #include "apps/app_lifetime_monitor_factory.h"
-#include "apps/shell_window_registry.h"
-#include "chrome/browser/profiles/incognito_helpers.h"
+#include "apps/app_window_registry.h"
 #include "components/browser_context_keyed_service/browser_context_dependency_manager.h"
+#include "extensions/browser/extensions_browser_client.h"
 
 namespace apps {
 
@@ -37,7 +37,8 @@ bool AppKeepAliveServiceFactory::ServiceIsCreatedWithBrowserContext() const {
 
 content::BrowserContext* AppKeepAliveServiceFactory::GetBrowserContextToUse(
     content::BrowserContext* context) const {
-  return chrome::GetBrowserContextRedirectedInIncognito(context);
+  return extensions::ExtensionsBrowserClient::Get()->
+      GetOriginalContext(context);
 }
 
 bool AppKeepAliveServiceFactory::ServiceIsNULLWhileTesting() const {