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

Unified Diff: chrome/browser/ui/app_list/arc/arc_app_utils.cc

Issue 2813633002: arc: Notification for guiding the user to filesystem migration. (Closed)
Patch Set: Fix for hidehiko@'s comments. Created 3 years, 8 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/app_list/arc/arc_app_utils.cc
diff --git a/chrome/browser/ui/app_list/arc/arc_app_utils.cc b/chrome/browser/ui/app_list/arc/arc_app_utils.cc
index 417df3224fec001287b6bf860a7856db2ea4dda7..37528f09f950770546334b0c6214852aa3e4da02 100644
--- a/chrome/browser/ui/app_list/arc/arc_app_utils.cc
+++ b/chrome/browser/ui/app_list/arc/arc_app_utils.cc
@@ -12,6 +12,7 @@
#include "base/json/json_writer.h"
#include "base/synchronization/waitable_event.h"
#include "base/values.h"
+#include "chrome/browser/chromeos/arc/arc_migration_guide_notification.h"
#include "chrome/browser/chromeos/arc/arc_session_manager.h"
#include "chrome/browser/chromeos/arc/arc_util.h"
#include "chrome/browser/profiles/profile.h"
@@ -265,11 +266,20 @@ bool LaunchApp(content::BrowserContext* context,
const std::string& app_id,
bool landscape_layout,
int event_flags) {
+ Profile* const profile = Profile::FromBrowserContext(context);
+
+ // Even when ARC is not allowed for the profile, ARC apps may still show up
+ // as a placeholder to show the guide notification for proper configuration.
+ // Handle such a case here and shows the desired notification.
+ if (IsArcAllowedInAppListForProfile(profile) &&
+ !IsArcAllowedForProfile(profile)) {
+ arc::ShowArcMigrationGuideNotification(profile);
+ return false;
+ }
+
ArcAppListPrefs* prefs = ArcAppListPrefs::Get(context);
std::unique_ptr<ArcAppListPrefs::AppInfo> app_info = prefs->GetApp(app_id);
if (app_info && !app_info->ready) {
- Profile* profile = Profile::FromBrowserContext(context);
-
if (!IsArcPlayStoreEnabledForProfile(profile)) {
if (prefs->IsDefault(app_id)) {
// The setting can fail if the preference is managed. However, the

Powered by Google App Engine
This is Rietveld 408576698