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

Unified Diff: chrome/browser/ui/extensions/app_launch_params.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: 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..fc847b9d323fc7f09a9e827f1cb4b9abf5f03d35 100644
--- a/chrome/browser/ui/extensions/app_launch_params.cc
+++ b/chrome/browser/ui/extensions/app_launch_params.cc
@@ -4,8 +4,11 @@
#include "chrome/browser/ui/extensions/app_launch_params.h"
+#include "base/memory/ptr_util.h"
+#include "chrome/browser/chromeos/arc/arc_auth_service.h"
#include "chrome/browser/extensions/launch_util.h"
#include "chrome/browser/profiles/profile.h"
+#include "components/arc/arc_bridge_service.h"
#include "extensions/browser/extension_prefs.h"
#include "extensions/common/constants.h"
#include "extensions/common/extension.h"
@@ -17,13 +20,23 @@ 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 (set_playstore_status) {
+ if (arc::ArcAuthService::IsAllowedForProfile(profile)) {
+ play_store_status = PlayStoreStatus::PLAY_STORE_STATUS_ENABLED;
+ } else if (arc::ArcBridgeService::IsArcAvailable()) {
+ play_store_status = PlayStoreStatus::PLAY_STORE_STATUS_AVAILABLE;
+ } // else, defaults to PLAY_STORE_STATUS_UNKNOWN.
+ }
+}
AppLaunchParams::AppLaunchParams(const AppLaunchParams& other) = default;

Powered by Google App Engine
This is Rietveld 408576698