summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstevenjb@chromium.org <stevenjb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-14 17:46:06 +0000
committerstevenjb@chromium.org <stevenjb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-14 17:46:06 +0000
commitb840e9474287ca3290b224853de1c38948ffa146 (patch)
tree045dafc5f5cecf64747edb99f09f7b6a791f0a3d
parent1af65918b902a8f9e3e024963c756b651c137c26 (diff)
downloadchromium_src-b840e9474287ca3290b224853de1c38948ffa146.zip
chromium_src-b840e9474287ca3290b224853de1c38948ffa146.tar.gz
chromium_src-b840e9474287ca3290b224853de1c38948ffa146.tar.bz2
Merge 263067 "Use original context for AppListSyncableServiceFac..."
> Use original context for AppListSyncableServiceFactory > > BUG=361508 > > Review URL: https://codereview.chromium.org/231793005 TBR=stevenjb@chromium.org Review URL: https://codereview.chromium.org/231933007 git-svn-id: svn://svn.chromium.org/chrome/branches/1916/src@263660 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/ui/app_list/app_list_syncable_service_factory.cc18
1 files changed, 12 insertions, 6 deletions
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 db66cf8..09a6a80 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
@@ -13,6 +13,10 @@
#include "extensions/browser/extension_system_provider.h"
#include "extensions/browser/extensions_browser_client.h"
+#if defined(OS_CHROMEOS)
+#include "chrome/browser/chromeos/profiles/profile_helper.h"
+#endif
+
namespace app_list {
// static
@@ -31,7 +35,12 @@ AppListSyncableServiceFactory* AppListSyncableServiceFactory::GetInstance() {
KeyedService* AppListSyncableServiceFactory::BuildInstanceFor(
content::BrowserContext* browser_context) {
Profile* profile = static_cast<Profile*>(browser_context);
- VLOG(1) << "BuildServiceInstanceFor: " << profile->GetDebugName();
+#if defined(OS_CHROMEOS)
+ if (chromeos::ProfileHelper::IsSigninProfile(profile))
+ return NULL;
+#endif
+ VLOG(1) << "BuildInstanceFor: " << profile->GetDebugName()
+ << " (" << profile << ")";
return new AppListSyncableService(profile,
extensions::ExtensionSystem::Get(profile));
}
@@ -59,11 +68,8 @@ void AppListSyncableServiceFactory::RegisterProfilePrefs(
content::BrowserContext* AppListSyncableServiceFactory::GetBrowserContextToUse(
content::BrowserContext* context) const {
- // In Guest session, off the record profile should not be redirected to the
- // original one.
- Profile* profile = static_cast<Profile*>(context);
- if (profile->IsGuestSession())
- return chrome::GetBrowserContextOwnInstanceInIncognito(context);
+ // This matches the logic in ExtensionSyncServiceFactory, which uses the
+ // orginal browser context.
return chrome::GetBrowserContextRedirectedInIncognito(context);
}