Index: apps/launcher.cc |
diff --git a/apps/launcher.cc b/apps/launcher.cc |
index 6904f0f0cd8f5226b6466c33759d95e699dd81d6..77161c7eda806bd4df030346d11a31667f46da3c 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" |
@@ -203,8 +204,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 +357,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 +392,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; |
xiyuan
2016/08/24 20:50:31
If this line is skipped (i.e. play_store_status =
rkc
2016/08/24 20:56:29
It ends up being 'undefined' in the app. I tested
|
+ AppRuntimeEventRouter::DispatchOnLaunchedEvent(profile, app, source, |
+ std::move(launch_data)); |
return; |
} |
@@ -455,7 +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>()); |
+ std::unique_ptr<app_runtime::LaunchData>()); |
} |
} |