Commit 388430e9 authored by Wei Lee's avatar Wei Lee Committed by Commit Bot

Revert "[CCA] Retained pinned status after migrating to SWA"

This reverts commit 7e541959.

Reason for revert: b/173092399

Original change's description:
> [CCA] Retained pinned status after migrating to SWA
>
> This CL fixes a bug that the pinned status might be lost after migrating
> CCA to SWA.
>
> Bug: 1144678
> Test: Manually
>
> Change-Id: I9bf2fd846645a77d8b7a47cbd7b9afc043950943
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2516659
> Commit-Queue: Wei Lee <wtlee@chromium.org>
> Reviewed-by: Alan Cutter <alancutter@chromium.org>
> Reviewed-by: Giovanni Ortuño Urquidi <ortuno@chromium.org>
> Reviewed-by: Ben Wells <benwells@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#825255}

TBR=benwells@chromium.org,alancutter@chromium.org,ortuno@chromium.org,wtlee@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 1144678
Change-Id: Ib55441a7ef81924a0256429ab5ccd1526cb754ce
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2537739Reviewed-by: default avatarWei Lee <wtlee@chromium.org>
Commit-Queue: Wei Lee <wtlee@chromium.org>
Cr-Commit-Position: refs/heads/master@{#827576}
parent 5bb2864f
...@@ -56,7 +56,6 @@ ...@@ -56,7 +56,6 @@
#include "chrome/browser/unexpire_flags.h" #include "chrome/browser/unexpire_flags.h"
#include "chrome/browser/unexpire_flags_gen.h" #include "chrome/browser/unexpire_flags_gen.h"
#include "chrome/browser/video_tutorials/switches.h" #include "chrome/browser/video_tutorials/switches.h"
#include "chrome/browser/web_applications/components/external_app_install_features.h"
#include "chrome/common/buildflags.h" #include "chrome/common/buildflags.h"
#include "chrome/common/channel_info.h" #include "chrome/common/channel_info.h"
#include "chrome/common/chrome_content_client.h" #include "chrome/common/chrome_content_client.h"
...@@ -3752,7 +3751,7 @@ const FeatureEntry kFeatureEntries[] = { ...@@ -3752,7 +3751,7 @@ const FeatureEntry kFeatureEntries[] = {
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
{"camera-system-web-app", flag_descriptions::kCameraSystemWebAppName, {"camera-system-web-app", flag_descriptions::kCameraSystemWebAppName,
flag_descriptions::kCameraSystemWebAppDescription, kOsCrOS, flag_descriptions::kCameraSystemWebAppDescription, kOsCrOS,
FEATURE_VALUE_TYPE(web_app::kCameraSystemWebApp)}, FEATURE_VALUE_TYPE(chromeos::features::kCameraSystemWebApp)},
{"crostini-gpu-support", flag_descriptions::kCrostiniGpuSupportName, {"crostini-gpu-support", flag_descriptions::kCrostiniGpuSupportName,
flag_descriptions::kCrostiniGpuSupportDescription, kOsCrOS, flag_descriptions::kCrostiniGpuSupportDescription, kOsCrOS,
FEATURE_VALUE_TYPE(chromeos::features::kCrostiniGpuSupport)}, FEATURE_VALUE_TYPE(chromeos::features::kCrostiniGpuSupport)},
......
...@@ -7,16 +7,17 @@ ...@@ -7,16 +7,17 @@
#include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_finder.h" #include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/views/frame/browser_view.h" #include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/browser/web_applications/components/external_app_install_features.h"
#include "chrome/browser/web_applications/system_web_app_manager_browsertest.h" #include "chrome/browser/web_applications/system_web_app_manager_browsertest.h"
#include "chrome/test/base/ui_test_utils.h" #include "chrome/test/base/ui_test_utils.h"
#include "chromeos/constants/chromeos_features.h"
#include "content/public/test/browser_test.h" #include "content/public/test/browser_test.h"
#include "content/public/test/test_navigation_observer.h" #include "content/public/test/test_navigation_observer.h"
class CameraAppIntegrationTest : public SystemWebAppIntegrationTest { class CameraAppIntegrationTest : public SystemWebAppIntegrationTest {
public: public:
CameraAppIntegrationTest() { CameraAppIntegrationTest() {
scoped_feature_list_.InitAndEnableFeature(web_app::kCameraSystemWebApp); scoped_feature_list_.InitWithFeatures(
{chromeos::features::kCameraSystemWebApp}, {});
} }
private: private:
......
...@@ -395,8 +395,10 @@ void ComponentLoader::AddKeyboardApp() { ...@@ -395,8 +395,10 @@ void ComponentLoader::AddKeyboardApp() {
} }
void ComponentLoader::AddChromeCameraApp() { void ComponentLoader::AddChromeCameraApp() {
// TODO(crbug.com/1135280): Remove all the logic here once CCA is fully if (base::FeatureList::IsEnabled(chromeos::features::kCameraSystemWebApp)) {
// migrated to SWA. return;
}
base::FilePath resources_path; base::FilePath resources_path;
if (base::PathService::Get(chrome::DIR_RESOURCES, &resources_path)) { if (base::PathService::Get(chrome::DIR_RESOURCES, &resources_path)) {
AddComponentFromDir(resources_path.Append(extension_misc::kCameraAppPath), AddComponentFromDir(resources_path.Append(extension_misc::kCameraAppPath),
......
...@@ -16,9 +16,6 @@ namespace { ...@@ -16,9 +16,6 @@ namespace {
constexpr const base::Feature* kExternalAppInstallFeatures[] = { constexpr const base::Feature* kExternalAppInstallFeatures[] = {
&kMigrateDefaultChromeAppToWebAppsGSuite, &kMigrateDefaultChromeAppToWebAppsGSuite,
&kMigrateDefaultChromeAppToWebAppsNonGSuite, &kMigrateDefaultChromeAppToWebAppsNonGSuite,
#if defined(OS_CHROMEOS)
&kCameraSystemWebApp
#endif // OS_CHROMEOS
}; };
bool g_always_enabled_for_testing = false; bool g_always_enabled_for_testing = false;
...@@ -37,12 +34,6 @@ const base::Feature kMigrateDefaultChromeAppToWebAppsNonGSuite{ ...@@ -37,12 +34,6 @@ const base::Feature kMigrateDefaultChromeAppToWebAppsNonGSuite{
"MigrateDefaultChromeAppToWebAppsNonGSuite", "MigrateDefaultChromeAppToWebAppsNonGSuite",
base::FEATURE_DISABLED_BY_DEFAULT}; base::FEATURE_DISABLED_BY_DEFAULT};
#if defined(OS_CHROMEOS)
// Enable or disables running the Camera App as a System Web App.
const base::Feature kCameraSystemWebApp{"CameraSystemWebApp",
base::FEATURE_DISABLED_BY_DEFAULT};
#endif // OS_CHROMEOS
bool IsExternalAppInstallFeatureEnabled(base::StringPiece feature_name) { bool IsExternalAppInstallFeatureEnabled(base::StringPiece feature_name) {
if (g_always_enabled_for_testing) if (g_always_enabled_for_testing)
return true; return true;
......
...@@ -15,10 +15,6 @@ extern const base::Feature kMigrateDefaultChromeAppToWebAppsGSuite; ...@@ -15,10 +15,6 @@ extern const base::Feature kMigrateDefaultChromeAppToWebAppsGSuite;
extern const base::Feature kMigrateDefaultChromeAppToWebAppsNonGSuite; extern const base::Feature kMigrateDefaultChromeAppToWebAppsNonGSuite;
#if defined(OS_CHROMEOS)
extern const base::Feature kCameraSystemWebApp;
#endif // OS_CHROMEOS
// Returns the base::Feature in |kExternalAppInstallFeatures| that corresponds // Returns the base::Feature in |kExternalAppInstallFeatures| that corresponds
// to |feature_name|. Used by external app install configs to gate installation // to |feature_name|. Used by external app install configs to gate installation
// on features listed in |kExternalAppInstallFeatures|. // on features listed in |kExternalAppInstallFeatures|.
......
...@@ -56,7 +56,6 @@ ...@@ -56,7 +56,6 @@
#include "chrome/browser/chromeos/web_applications/scanning_system_web_app_info.h" #include "chrome/browser/chromeos/web_applications/scanning_system_web_app_info.h"
#include "chrome/browser/chromeos/web_applications/terminal_source.h" #include "chrome/browser/chromeos/web_applications/terminal_source.h"
#include "chrome/browser/chromeos/web_applications/terminal_system_web_app_info.h" #include "chrome/browser/chromeos/web_applications/terminal_system_web_app_info.h"
#include "chrome/browser/web_applications/components/external_app_install_features.h"
#include "chromeos/components/camera_app_ui/url_constants.h" #include "chromeos/components/camera_app_ui/url_constants.h"
#include "chromeos/components/connectivity_diagnostics/url_constants.h" #include "chromeos/components/connectivity_diagnostics/url_constants.h"
#include "chromeos/components/help_app_ui/url_constants.h" #include "chromeos/components/help_app_ui/url_constants.h"
...@@ -338,7 +337,8 @@ bool SystemWebAppManager::IsAppEnabled(SystemAppType type) { ...@@ -338,7 +337,8 @@ bool SystemWebAppManager::IsAppEnabled(SystemAppType type) {
case SystemAppType::SETTINGS: case SystemAppType::SETTINGS:
return true; return true;
case SystemAppType::CAMERA: case SystemAppType::CAMERA:
return base::FeatureList::IsEnabled(web_app::kCameraSystemWebApp); return base::FeatureList::IsEnabled(
chromeos::features::kCameraSystemWebApp);
case SystemAppType::TERMINAL: case SystemAppType::TERMINAL:
return true; return true;
case SystemAppType::MEDIA: case SystemAppType::MEDIA:
......
...@@ -145,6 +145,10 @@ const base::Feature kBluetoothFixA2dpPacketSize{ ...@@ -145,6 +145,10 @@ const base::Feature kBluetoothFixA2dpPacketSize{
const base::Feature kBluetoothPhoneFilter{"BluetoothPhoneFilter", const base::Feature kBluetoothPhoneFilter{"BluetoothPhoneFilter",
base::FEATURE_ENABLED_BY_DEFAULT}; base::FEATURE_ENABLED_BY_DEFAULT};
// Enable or disables running the Camera App as a System Web App.
const base::Feature kCameraSystemWebApp{"CameraSystemWebApp",
base::FEATURE_DISABLED_BY_DEFAULT};
// If enabled, will use the CDM in the Chrome OS daemon rather than loading the // If enabled, will use the CDM in the Chrome OS daemon rather than loading the
// CDM using the library CDM interface. // CDM using the library CDM interface.
const base::Feature kCdmFactoryDaemon{"CdmFactoryDaemon", const base::Feature kCdmFactoryDaemon{"CdmFactoryDaemon",
......
...@@ -80,6 +80,8 @@ extern const base::Feature kBluetoothFixA2dpPacketSize; ...@@ -80,6 +80,8 @@ extern const base::Feature kBluetoothFixA2dpPacketSize;
COMPONENT_EXPORT(CHROMEOS_CONSTANTS) COMPONENT_EXPORT(CHROMEOS_CONSTANTS)
extern const base::Feature kBluetoothPhoneFilter; extern const base::Feature kBluetoothPhoneFilter;
COMPONENT_EXPORT(CHROMEOS_CONSTANTS) COMPONENT_EXPORT(CHROMEOS_CONSTANTS)
extern const base::Feature kCameraSystemWebApp;
COMPONENT_EXPORT(CHROMEOS_CONSTANTS)
extern const base::Feature kCdmFactoryDaemon; extern const base::Feature kCdmFactoryDaemon;
COMPONENT_EXPORT(CHROMEOS_CONSTANTS) COMPONENT_EXPORT(CHROMEOS_CONSTANTS)
extern const base::Feature kChildSpecificSignin; extern const base::Feature kChildSpecificSignin;
......
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