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

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: cleanup 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..246eff6e40480702d7c18e2e90bbb91f1e2c3d17 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,16 @@ class ArcDefaultAppList {
base::FilePath app_path; // App folder that contains pre-installed icons.
};
+ enum class FilterLevel {
+ // Filter nothing.
+ FILTER_NOTHING,
+ // Filter only optional apps, excluding Play Store for example. Used for
+ // managed and enabled case.
hidehiko 2017/03/09 06:17:00 Ditto.
khmel 2017/03/09 18:00:43 Done.
+ FILTER_OPTIONAL_APPS,
+ // Filter everything. Used for managed and disable case.
+ FILTER_ALL
+ };
+
// Defines App id to default AppInfo mapping.
using AppInfoMap = std::map<std::string, std::unique_ptr<AppInfo>>;
@@ -73,10 +83,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 +97,7 @@ class ArcDefaultAppList {
// Unowned pointer.
Delegate* const delegate_;
content::BrowserContext* const context_;
- bool hidden_ = true;
+ FilterLevel filter_level_ = FilterLevel::FILTER_ALL;
AppInfoMap apps_;
PackageMap packages_;

Powered by Google App Engine
This is Rietveld 408576698