Commit d6097259 authored by Ella Ge's avatar Ella Ge Committed by Commit Bot

[LargeSplash:4]Remove badge icon from installable params, installable data etc.

This CL is the clean up for Large splash icon for oneoff.

We already removed all usage of badge icon, so this CL removes
badge_icon related field in InstallableData and InstallableParams,
and also obsoletes BADGE_ICON_HASH_DIFFERS.

Bug: 1043271
Change-Id: I52a32a9dee9177dd911ffbc94e410010253a0acb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2037820
Commit-Queue: Ella Ge <eirage@chromium.org>
Reviewed-by: default avatarPeter Kotwicz <pkotwicz@chromium.org>
Reviewed-by: default avatarDominick Ng <dominickn@chromium.org>
Cr-Commit-Position: refs/heads/master@{#745087}
parent 1d7cbd22
......@@ -627,7 +627,6 @@ jumbo_static_library("browser") {
"installable/installable_manager.h",
"installable/installable_metrics.cc",
"installable/installable_metrics.h",
"installable/installable_params.cc",
"installable/installable_params.h",
"installable/installable_task_queue.cc",
"installable/installable_task_queue.h",
......
......@@ -36,7 +36,6 @@ message WebApk {
NONE = 1;
OLD_SHELL_APK = 2;
PRIMARY_ICON_HASH_DIFFERS = 3;
BADGE_ICON_HASH_DIFFERS = 4;
SCOPE_DIFFERS = 5;
START_URL_DIFFERS = 6;
SHORT_NAME_DIFFERS = 7;
......@@ -50,6 +49,8 @@ message WebApk {
PRIMARY_ICON_MASKABLE_DIFFERS = 15;
SHORTCUTS_DIFFER = 16;
SPLASH_ICON_HASH_DIFFERS = 17;
reserved 4;
}
// Package name of the WebAPK.
......
......@@ -125,8 +125,6 @@ webapk::WebApk_UpdateReason ConvertUpdateReasonToProtoEnum(
return webapk::WebApk::PRIMARY_ICON_HASH_DIFFERS;
case WebApkUpdateReason::PRIMARY_ICON_MASKABLE_DIFFERS:
return webapk::WebApk::PRIMARY_ICON_MASKABLE_DIFFERS;
case WebApkUpdateReason::BADGE_ICON_HASH_DIFFERS:
return webapk::WebApk::BADGE_ICON_HASH_DIFFERS;
case WebApkUpdateReason::SPLASH_ICON_HASH_DIFFERS:
return webapk::WebApk::SPLASH_ICON_HASH_DIFFERS;
case WebApkUpdateReason::SCOPE_DIFFERS:
......
......@@ -14,7 +14,6 @@ enum class WebApkUpdateReason {
OLD_SHELL_APK,
PRIMARY_ICON_HASH_DIFFERS,
PRIMARY_ICON_MASKABLE_DIFFERS,
BADGE_ICON_HASH_DIFFERS,
SPLASH_ICON_HASH_DIFFERS,
SCOPE_DIFFERS,
START_URL_DIFFERS,
......
......@@ -22,8 +22,6 @@ InstallableData::InstallableData(std::vector<InstallableStatusCode> errors,
primary_icon_url(primary_icon_url),
primary_icon(primary_icon),
has_maskable_primary_icon(has_maskable_primary_icon),
badge_icon_url(GURL::EmptyGURL()),
badge_icon(nullptr),
splash_icon_url(splash_icon_url),
splash_icon(splash_icon),
valid_manifest(valid_manifest),
......
......@@ -55,17 +55,6 @@ struct InstallableData {
// primary_icon was requested.
const bool has_maskable_primary_icon;
// The URL of the chosen badge icon.
const GURL& badge_icon_url;
// nullptr if the most appropriate badge icon couldn't be determined or
// downloaded. The underlying badge icon is owned by the InstallableManager;
// clients must copy the bitmap if they want to to use it. Since the badge
// icon is optional, no error code is set if it cannot be fetched, and clients
// specifying |valid_badge_icon| must check that the bitmap exists before
// using it.
const SkBitmap* badge_icon;
// The URL of the chosen splash icon.
const GURL& splash_icon_url;
......
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/installable/installable_params.h"
InstallableParams::InstallableParams() = default;
InstallableParams::InstallableParams(const InstallableParams&) = default;
......@@ -11,8 +11,6 @@
// true, otherwise, all tasks will be run and a complete list of errors will be
// returned.
struct InstallableParams {
InstallableParams();
InstallableParams(const InstallableParams&);
// Check whether the current WebContents is eligible to be installed, i.e it:
// - is served over HTTPS
// - is a top-level frame
......@@ -26,10 +24,6 @@ struct InstallableParams {
// Whether to prefer an icon with purpose 'maskable' for the primary icon.
bool prefer_maskable_icon = false;
// Check whether there is a fetchable, non-empty icon in the manifest
// conforming to the badge icon size parameters.
bool valid_badge_icon = false;
// Check whether there is a fetchable, non-empty icon in the manifest
// conforming to the splash icon size parameters.
bool valid_splash_icon = false;
......
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