Index: apps/launcher.cc |
diff --git a/apps/launcher.cc b/apps/launcher.cc |
index 6904f0f0cd8f5226b6466c33759d95e699dd81d6..1ac5aef27947de679163f78d81d4f6998fe81ea3 100644 |
--- a/apps/launcher.cc |
+++ b/apps/launcher.cc |
@@ -12,6 +12,7 @@ |
#include "base/files/file_path.h" |
#include "base/files/file_util.h" |
#include "base/logging.h" |
+#include "base/memory/ptr_util.h" |
#include "base/memory/ref_counted.h" |
#include "base/strings/string_util.h" |
#include "base/strings/utf_string_conversions.h" |
@@ -48,6 +49,7 @@ namespace app_runtime = extensions::api::app_runtime; |
using content::BrowserThread; |
using extensions::AppRuntimeEventRouter; |
+using extensions::api::app_runtime::PlayStoreStatus; |
using extensions::app_file_handler_util::CreateFileEntry; |
using extensions::app_file_handler_util::FileHandlerCanHandleEntry; |
using extensions::app_file_handler_util::FileHandlerForId; |
@@ -203,8 +205,12 @@ class PlatformAppPathLauncher |
if (!app) |
return; |
+ std::unique_ptr<app_runtime::LaunchData> launch_data = |
+ base::MakeUnique<app_runtime::LaunchData>(); |
+ launch_data->action_data = std::move(action_data_); |
+ |
AppRuntimeEventRouter::DispatchOnLaunchedEvent( |
- profile_, app, launch_source_, std::move(action_data_)); |
+ profile_, app, launch_source_, std::move(launch_data)); |
} |
void OnAreDirectoriesCollected( |
@@ -352,10 +358,11 @@ class PlatformAppPathLauncher |
} // namespace |
void LaunchPlatformAppWithCommandLine(Profile* profile, |
- const Extension* app, |
+ const extensions::Extension* app, |
const base::CommandLine& command_line, |
const base::FilePath& current_directory, |
- extensions::AppLaunchSource source) { |
+ extensions::AppLaunchSource source, |
+ PlayStoreStatus play_store_status) { |
// An app with "kiosk_only" should not be installed and launched |
// outside of ChromeOS kiosk mode in the first place. This is a defensive |
// check in case this scenario does occur. |
@@ -386,8 +393,12 @@ void LaunchPlatformAppWithCommandLine(Profile* profile, |
// causes problems on the bots. |
if (args.empty() || (command_line.HasSwitch(switches::kTestType) && |
args[0] == about_blank_url)) { |
- AppRuntimeEventRouter::DispatchOnLaunchedEvent( |
- profile, app, source, std::unique_ptr<app_runtime::ActionData>()); |
+ std::unique_ptr<app_runtime::LaunchData> launch_data = |
+ base::MakeUnique<app_runtime::LaunchData>(); |
+ if (play_store_status != PlayStoreStatus::PLAY_STORE_STATUS_UNKNOWN) |
+ launch_data->play_store_status = play_store_status; |
+ AppRuntimeEventRouter::DispatchOnLaunchedEvent(profile, app, source, |
+ std::move(launch_data)); |
return; |
} |
@@ -454,8 +465,7 @@ void RestartPlatformApp(Profile* profile, const Extension* app) { |
if (listening_to_launch && had_windows) { |
AppRuntimeEventRouter::DispatchOnLaunchedEvent( |
- profile, app, extensions::SOURCE_RESTART, |
- std::unique_ptr<app_runtime::ActionData>()); |
+ profile, app, extensions::SOURCE_RESTART, nullptr); |
} |
} |