Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Commit

Permalink
Fix experimental app list's start page logo not showing in Guest Mode.
Browse files Browse the repository at this point in the history
This CL fixes an issue with the app list not showing the start page
logo in ChromeOS Guest Mode. This was happening because no start page
service was being created for incognito contexts.

This will also cause voice search to be enabled in the app list in
Guest Mode.

BUG=440484

Review URL: https://codereview.chromium.org/879033003

Cr-Commit-Position: refs/heads/master@{#315272}
  • Loading branch information
nik3daz authored and Commit bot committed Feb 9, 2015
1 parent 9506d1f commit 64121b7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion chrome/browser/ui/app_list/app_list_service_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ AppListServiceImpl::~AppListServiceImpl() {}
AppListViewDelegate* AppListServiceImpl::GetViewDelegate(Profile* profile) {
if (!view_delegate_)
view_delegate_.reset(new AppListViewDelegate(GetControllerDelegate()));
view_delegate_->SetProfile(profile);
view_delegate_->SetProfile(profile->GetOriginalProfile());
return view_delegate_.get();
}

Expand Down
7 changes: 7 additions & 0 deletions chrome/browser/ui/app_list/start_page_service_factory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include "base/command_line.h"
#include "chrome/browser/extensions/install_tracker_factory.h"
#include "chrome/browser/profiles/incognito_helpers.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/app_list/start_page_service.h"
#include "chrome/common/chrome_switches.h"
Expand Down Expand Up @@ -49,4 +50,10 @@ KeyedService* StartPageServiceFactory::BuildServiceInstanceFor(
return new StartPageService(profile);
}

content::BrowserContext* StartPageServiceFactory::GetBrowserContextToUse(
content::BrowserContext* context) const {
// The start page service needs an instance in ChromeOS guest mode.
return chrome::GetBrowserContextRedirectedInIncognito(context);
}

} // namespace app_list
2 changes: 2 additions & 0 deletions chrome/browser/ui/app_list/start_page_service_factory.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ class StartPageServiceFactory : public BrowserContextKeyedServiceFactory {
// BrowserContextKeyedServiceFactory overrides:
KeyedService* BuildServiceInstanceFor(
content::BrowserContext* context) const override;
content::BrowserContext* GetBrowserContextToUse(
content::BrowserContext* context) const override;

DISALLOW_COPY_AND_ASSIGN(StartPageServiceFactory);
};
Expand Down

0 comments on commit 64121b7

Please sign in to comment.