| Index: chrome/browser/ui/extensions/app_launch_params.cc
|
| diff --git a/chrome/browser/ui/extensions/app_launch_params.cc b/chrome/browser/ui/extensions/app_launch_params.cc
|
| index 271d87a34c9f764ebb2fd71e6f2ba26a41f74d60..91fbe22c688c791416a915e0cb3a8efe445552c3 100644
|
| --- a/chrome/browser/ui/extensions/app_launch_params.cc
|
| +++ b/chrome/browser/ui/extensions/app_launch_params.cc
|
| @@ -4,6 +4,7 @@
|
|
|
| #include "chrome/browser/ui/extensions/app_launch_params.h"
|
|
|
| +#include "base/memory/ptr_util.h"
|
| #include "chrome/browser/extensions/launch_util.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| #include "extensions/browser/extension_prefs.h"
|
| @@ -11,19 +12,37 @@
|
| #include "extensions/common/extension.h"
|
| #include "ui/base/window_open_disposition.h"
|
|
|
| +#if defined(OS_CHROMEOS)
|
| +#include "chrome/browser/chromeos/arc/arc_auth_service.h"
|
| +#include "components/arc/arc_bridge_service.h"
|
| +#endif
|
| +
|
| using extensions::ExtensionPrefs;
|
|
|
| AppLaunchParams::AppLaunchParams(Profile* profile,
|
| const extensions::Extension* extension,
|
| extensions::LaunchContainer container,
|
| WindowOpenDisposition disposition,
|
| - extensions::AppLaunchSource source)
|
| + extensions::AppLaunchSource source,
|
| + bool set_playstore_status)
|
| : profile(profile),
|
| extension_id(extension ? extension->id() : std::string()),
|
| container(container),
|
| disposition(disposition),
|
| command_line(base::CommandLine::NO_PROGRAM),
|
| - source(source) {}
|
| + source(source),
|
| + play_store_status(PlayStoreStatus::PLAY_STORE_STATUS_UNKNOWN) {
|
| +#if defined(OS_CHROMEOS)
|
| + if (set_playstore_status) {
|
| + if (arc::ArcAuthService::IsAllowedForProfile(profile)) {
|
| + play_store_status = PlayStoreStatus::PLAY_STORE_STATUS_ENABLED;
|
| + } else if (arc::ArcBridgeService::GetAvailable(
|
| + base::CommandLine::ForCurrentProcess())) {
|
| + play_store_status = PlayStoreStatus::PLAY_STORE_STATUS_AVAILABLE;
|
| + } // else, default to PLAY_STORE_STATUS_UNKNOWN.
|
| + }
|
| +#endif
|
| +}
|
|
|
| AppLaunchParams::AppLaunchParams(const AppLaunchParams& other) = default;
|
|
|
|
|