Skip to content

Commit

Permalink
AppShell: Use apps/launcher.h
Browse files Browse the repository at this point in the history
Use the apps::LaunchPlatformApp convenience function instead of
manually triggering the launch event to make ShellExtensionSystem
simpler.

Split out of https://crrev.com/c/912132.

Change-Id: Ic0953a14bf471298e048b4ec1c077a6012baa923
Reviewed-on: https://chromium-review.googlesource.com/927938
Commit-Queue: Michael Giuffrida <michaelpg@chromium.org>
Reviewed-by: Devlin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#538224}
  • Loading branch information
michaelpg authored and Commit Bot committed Feb 21, 2018
1 parent 5b2f184 commit b6d7cd0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions extensions/shell/browser/shell_extension_system.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include <string>

#include "apps/launcher.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/memory/ptr_util.h"
Expand All @@ -14,7 +15,6 @@
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_source.h"
#include "extensions/browser/api/app_runtime/app_runtime_api.h"
#include "extensions/browser/extension_prefs.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/info_map.h"
Expand All @@ -25,7 +25,6 @@
#include "extensions/browser/runtime_data.h"
#include "extensions/browser/service_worker_manager.h"
#include "extensions/browser/value_store/value_store_factory_impl.h"
#include "extensions/common/api/app_runtime.h"
#include "extensions/common/constants.h"
#include "extensions/common/file_util.h"

Expand Down Expand Up @@ -110,8 +109,7 @@ void ShellExtensionSystem::LaunchApp(const ExtensionId& extension_id) {
const Extension* extension = ExtensionRegistry::Get(browser_context_)
->enabled_extensions()
.GetByID(extension_id);
AppRuntimeEventRouter::DispatchOnLaunchedEvent(browser_context_, extension,
SOURCE_UNTRACKED, nullptr);
apps::LaunchPlatformApp(browser_context_, extension, SOURCE_UNTRACKED);
}

void ShellExtensionSystem::Shutdown() {
Expand Down

0 comments on commit b6d7cd0

Please sign in to comment.