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

Unified Diff: chrome/browser/dom_ui/new_tab_ui.cc

Issue 2149003: Relanding 48042... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 7 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/defaults.cc ('k') | chrome/browser/dom_ui/shown_sections_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/dom_ui/new_tab_ui.cc
===================================================================
--- chrome/browser/dom_ui/new_tab_ui.cc (revision 48045)
+++ chrome/browser/dom_ui/new_tab_ui.cc (working copy)
@@ -505,9 +505,12 @@
if (ProfileSyncService::IsSyncEnabled()) {
AddMessageHandler((new NewTabPageSyncHandler())->Attach(this));
}
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableApps)) {
+ if (Extension::AppsAreEnabled()) {
ExtensionsService* service = GetProfile()->GetExtensionsService();
- AddMessageHandler((new AppLauncherHandler(service))->Attach(this));
+ // We might not have an ExtensionsService (on ChromeOS when not logged in
+ // for example).
+ if (service)
+ AddMessageHandler((new AppLauncherHandler(service))->Attach(this));
}
AddMessageHandler((new NewTabPageSetHomePageHandler())->Attach(this));
« no previous file with comments | « chrome/browser/defaults.cc ('k') | chrome/browser/dom_ui/shown_sections_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698