Index: chrome/browser/ui/app_list/app_list_syncable_service_factory.cc |
diff --git a/chrome/browser/ui/app_list/app_list_syncable_service_factory.cc b/chrome/browser/ui/app_list/app_list_syncable_service_factory.cc |
index 616bd0cfc1801f3bd045b675e4b7ab70c68840ad..71ced922f4ffd818cd39ce467cda3f604b8b12bc 100644 |
--- a/chrome/browser/ui/app_list/app_list_syncable_service_factory.cc |
+++ b/chrome/browser/ui/app_list/app_list_syncable_service_factory.cc |
@@ -4,6 +4,7 @@ |
#include "chrome/browser/ui/app_list/app_list_syncable_service_factory.h" |
+#include "base/command_line.h" |
#include "base/prefs/pref_service.h" |
#include "chrome/browser/extensions/extension_system.h" |
#include "chrome/browser/extensions/extension_system_factory.h" |
@@ -12,6 +13,10 @@ |
#include "chrome/browser/ui/app_list/app_list_syncable_service.h" |
#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" |
+#if defined(OS_CHROMEOS) |
+#include "chromeos/chromeos_switches.h" |
+#endif |
+ |
namespace app_list { |
// static |
@@ -51,6 +56,13 @@ void AppListSyncableServiceFactory::RegisterProfilePrefs( |
content::BrowserContext* AppListSyncableServiceFactory::GetBrowserContextToUse( |
content::BrowserContext* context) const { |
+#if defined(OS_CHROMEOS) |
+ if (CommandLine::ForCurrentProcess()->HasSwitch( |
+ chromeos::switches::kGuestSession)) { |
+ Profile* profile = static_cast<Profile*>(context); |
+ return profile->GetOffTheRecordProfile(); |
+ } |
stevenjb
2013/12/26 22:34:17
Please add a comment for this. It would be even be
tbarzic
2013/12/27 22:35:38
Yep, I agree a helper function for handling guest
|
+#endif |
return chrome::GetBrowserContextRedirectedInIncognito(context); |
} |