Chromium Code Reviews| 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_; |