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

Unified Diff: chrome/browser/ui/app_list/arc/arc_default_app_list.h

Issue 2738983003: arc: Enable Play Store item in App Launcher for managed case. (Closed)
Patch Set: remove FILTER_ from enum, minor comment update Created 3 years, 9 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_default_app_list.h
diff --git a/chrome/browser/ui/app_list/arc/arc_default_app_list.h b/chrome/browser/ui/app_list/arc/arc_default_app_list.h
index 6c48d2f87034f334ecbe36ae086a832fefc13ce1..39f992e8e1a4ccea249c01ca2d8fbb93c886b19d 100644
--- a/chrome/browser/ui/app_list/arc/arc_default_app_list.h
+++ b/chrome/browser/ui/app_list/arc/arc_default_app_list.h
@@ -46,6 +46,17 @@ class ArcDefaultAppList {
base::FilePath app_path; // App folder that contains pre-installed icons.
};
+ enum class FilterLevel {
+ // Filter nothing.
+ NOTHING,
+ // Filter out only optional apps, excluding Play Store for example. Used in
+ // case when Play Store is managed and enabled.
+ OPTIONAL_APPS,
+ // Filter out everything. Used in case when Play Store is managed and
+ // disabled.
+ ALL
+ };
+
// Defines App id to default AppInfo mapping.
using AppInfoMap = std::map<std::string, std::unique_ptr<AppInfo>>;
@@ -73,10 +84,9 @@ class ArcDefaultAppList {
const AppInfoMap& app_map() const { return apps_; }
- // Marks default apps as hidden for user, for example in case ARC is managed
- // and disabled.
- void set_hidden(bool hidden) { hidden_ = hidden; }
- bool is_hidden() const { return hidden_; }
+ void set_filter_level(FilterLevel filter_level) {
+ filter_level_ = filter_level;
+ }
private:
// Defines mapping package name to uninstalled state.
@@ -88,7 +98,7 @@ class ArcDefaultAppList {
// Unowned pointer.
Delegate* const delegate_;
content::BrowserContext* const context_;
- bool hidden_ = true;
+ FilterLevel filter_level_ = FilterLevel::ALL;
AppInfoMap apps_;
PackageMap packages_;
« no previous file with comments | « chrome/browser/ui/app_list/arc/arc_app_unittest.cc ('k') | chrome/browser/ui/app_list/arc/arc_default_app_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698