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

Unified Diff: apps/launcher.cc

Issue 2272813003: Add ARC++ specific fields to launch data for specific apps. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 4 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
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));
asargent_no_longer_on_chrome 2016/08/24 21:50:32 can you just use std::move(action_data_) here, and
asargent_no_longer_on_chrome 2016/08/24 22:01:02 Nevermind - I was confusing launch_data with actio
}
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>();
asargent_no_longer_on_chrome 2016/08/24 21:50:32 Not that it matters much here for performance sinc
rkc 2016/08/24 22:05:57 We're passing launch_data, which in the caller wil
+ 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;
}
@@ -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>());
}
}

Powered by Google App Engine
This is Rietveld 408576698