| Index: apps/launcher.cc
|
| diff --git a/apps/launcher.cc b/apps/launcher.cc
|
| index d1925112dd93844ee1b767a0fda026749912f2b1..03e394bb35f1348e9526a2d2cf4882478f8aa083 100644
|
| --- a/apps/launcher.cc
|
| +++ b/apps/launcher.cc
|
| @@ -37,6 +37,8 @@
|
| #include "extensions/common/api/app_runtime.h"
|
| #include "extensions/common/extension.h"
|
| #include "extensions/common/manifest_handlers/kiosk_mode_info.h"
|
| +#include "extensions/common/permissions/api_permission.h"
|
| +#include "extensions/common/permissions/permissions_data.h"
|
| #include "net/base/filename_util.h"
|
| #include "url/gurl.h"
|
|
|
| @@ -434,6 +436,14 @@ void LaunchPlatformAppWithAction(
|
| const extensions::Extension* app,
|
| std::unique_ptr<app_runtime::ActionData> action_data,
|
| const base::FilePath& file_path) {
|
| + if (action_data && action_data->is_lock_screen_action &&
|
| + *action_data->is_lock_screen_action &&
|
| + !app->permissions_data()->HasAPIPermission(
|
| + extensions::APIPermission::kLockScreen)) {
|
| + NOTREACHED() << "Launching lock screen action handler requires lockScreen "
|
| + << "permission.";
|
| + return;
|
| + }
|
| scoped_refptr<PlatformAppPathLauncher> launcher =
|
| new PlatformAppPathLauncher(context, app, file_path);
|
| launcher->set_action_data(std::move(action_data));
|
|
|