| Index: apps/launcher.cc
|
| diff --git a/apps/launcher.cc b/apps/launcher.cc
|
| index d1925112dd93844ee1b767a0fda026749912f2b1..3cf2ae0b61ab4ef9c7c44ecf12d5954c9166a78d 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,12 @@ void LaunchPlatformAppWithAction(
|
| const extensions::Extension* app,
|
| std::unique_ptr<app_runtime::ActionData> action_data,
|
| const base::FilePath& file_path) {
|
| + CHECK(!action_data || !action_data->is_lock_screen_action ||
|
| + !*action_data->is_lock_screen_action ||
|
| + app->permissions_data()->HasAPIPermission(
|
| + extensions::APIPermission::kLockScreen))
|
| + << "Launching lock screen action handler requires lockScreen permission.";
|
| +
|
| scoped_refptr<PlatformAppPathLauncher> launcher =
|
| new PlatformAppPathLauncher(context, app, file_path);
|
| launcher->set_action_data(std::move(action_data));
|
|
|