Commit ba43fa30 authored by nancylingwang's avatar nancylingwang Committed by Commit Bot

Remove default apps checking, and convert all apps to the standard icons

Since we have the circle checking, we can call the CreateStandardIcon
interface to convert all apps (including the essential apps/default
apps) to the standard icons, and the CreateStandardIcon interface can
check whether the icon is circle or not to apply shrink or not. So the
default apps checking can be removed.

BUG=1114771

Change-Id: I6c60fa8127c6f22e19824e21bffc8720100576f9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2351259
Commit-Queue: Nancy Wang <nancylingwang@chromium.org>
Reviewed-by: default avatarDominick Ng <dominickn@chromium.org>
Cr-Commit-Position: refs/heads/master@{#797138}
parent 5c07e57b
......@@ -29,7 +29,6 @@
#include "chrome/browser/chromeos/arc/arc_web_contents_data.h"
#include "chrome/browser/chromeos/child_accounts/time_limits/app_time_limit_interface.h"
#include "chrome/browser/chromeos/crostini/crostini_util.h"
#include "chrome/browser/chromeos/extensions/default_app_order.h"
#include "chrome/browser/chromeos/extensions/gfx_utils.h"
#include "chrome/browser/chromeos/policy/system_features_disable_list_policy_handler.h"
#include "chrome/browser/extensions/extension_service.h"
......@@ -184,8 +183,6 @@ void ExtensionAppsChromeOs::Initialize() {
GetWeakPtr()));
OnSystemFeaturesPrefChanged();
}
chromeos::default_app_order::Get(&default_app_ids_);
}
void ExtensionAppsChromeOs::LaunchAppWithIntent(
......@@ -659,8 +656,7 @@ IconEffects ExtensionAppsChromeOs::GetIconEffects(
const extensions::Extension* extension,
bool paused) {
IconEffects icon_effects = IconEffects::kNone;
if (base::FeatureList::IsEnabled(features::kAppServiceAdaptiveIcon) &&
!base::Contains(default_app_ids_, (extension->id()))) {
if (base::FeatureList::IsEnabled(features::kAppServiceAdaptiveIcon)) {
icon_effects =
static_cast<IconEffects>(icon_effects | IconEffects::kCrOsStandardIcon);
} else {
......
......@@ -158,8 +158,6 @@ class ExtensionAppsChromeOs : public ExtensionAppsBase,
extensions::AppWindowRegistry::Observer>
app_window_registry_{this};
std::vector<std::string> default_app_ids_;
PausedApps paused_apps_;
std::set<std::string> disabled_apps_;
......
......@@ -24,7 +24,6 @@
#include "chrome/browser/chromeos/arc/arc_util.h"
#include "chrome/browser/chromeos/arc/arc_web_contents_data.h"
#include "chrome/browser/chromeos/crostini/crostini_util.h"
#include "chrome/browser/chromeos/extensions/default_app_order.h"
#include "chrome/browser/chromeos/extensions/gfx_utils.h"
#include "chrome/browser/notifications/notification_display_service_factory.h"
#include "chrome/browser/profiles/profile.h"
......@@ -106,8 +105,6 @@ void WebAppsChromeOs::Initialize() {
notification_display_service_.Add(
NotificationDisplayServiceFactory::GetForProfile(profile()));
chromeos::default_app_order::Get(&default_app_ids_);
}
void WebAppsChromeOs::LaunchAppWithIntent(
......@@ -390,8 +387,7 @@ IconEffects WebAppsChromeOs::GetIconEffects(const web_app::WebApp* web_app,
bool paused,
bool is_disabled) {
IconEffects icon_effects = IconEffects::kNone;
if (base::FeatureList::IsEnabled(features::kAppServiceAdaptiveIcon) &&
!base::Contains(default_app_ids_, (web_app->app_id()))) {
if (base::FeatureList::IsEnabled(features::kAppServiceAdaptiveIcon)) {
icon_effects = web_app->is_generated_icon()
? static_cast<IconEffects>(
icon_effects | IconEffects::kCrOsStandardMask)
......
......@@ -116,8 +116,6 @@ class WebAppsChromeOs : public WebAppsBase,
apps::InstanceRegistry* instance_registry_;
std::vector<std::string> default_app_ids_;
PausedApps paused_apps_;
ArcAppListPrefs* arc_prefs_ = nullptr;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment