Commit a3da6ab5 authored by Kyle Horimoto's avatar Kyle Horimoto Committed by Commit Bot

[CrOS MultiDevice] Move MultiDevice flags from //chrome to //chromeos.

This is necessary because these flags need to be accessed from within
//ash and //chromeos, which do not have access to chrome_features.h
since it resides in //chrome.

Bug: 824568, 752273
Change-Id: I2d20f244bc88758825dd37edf5b9956336017563
Reviewed-on: https://chromium-review.googlesource.com/1029228
Commit-Queue: Kyle Horimoto <khorimoto@chromium.org>
Reviewed-by: default avatarSteven Bennetts <stevenjb@chromium.org>
Reviewed-by: default avatarStefan Kuhne <skuhne@chromium.org>
Reviewed-by: default avatarMihai Sardarescu <msarda@chromium.org>
Reviewed-by: default avatarJames Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#554459}
parent 818f328c
...@@ -139,6 +139,7 @@ ...@@ -139,6 +139,7 @@
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
#include "ash/public/cpp/ash_features.h" #include "ash/public/cpp/ash_features.h"
#include "ash/public/cpp/ash_switches.h" #include "ash/public/cpp/ash_switches.h"
#include "chromeos/chromeos_features.h"
#include "chromeos/chromeos_switches.h" #include "chromeos/chromeos_switches.h"
#include "components/arc/arc_features.h" #include "components/arc/arc_features.h"
#include "third_party/cros_system_api/switches/chrome_switches.h" #include "third_party/cros_system_api/switches/chrome_switches.h"
...@@ -1537,11 +1538,11 @@ const FeatureEntry kFeatureEntries[] = { ...@@ -1537,11 +1538,11 @@ const FeatureEntry kFeatureEntries[] = {
{"enable_unified_multidevice_settings", {"enable_unified_multidevice_settings",
flag_descriptions::kEnableUnifiedMultiDeviceSettingsName, flag_descriptions::kEnableUnifiedMultiDeviceSettingsName,
flag_descriptions::kEnableUnifiedMultiDeviceSettingsDescription, kOsCrOS, flag_descriptions::kEnableUnifiedMultiDeviceSettingsDescription, kOsCrOS,
FEATURE_VALUE_TYPE(features::kEnableUnifiedMultiDeviceSettings)}, FEATURE_VALUE_TYPE(chromeos::features::kEnableUnifiedMultiDeviceSettings)},
{"enable_unified_multidevice_setup", {"enable_unified_multidevice_setup",
flag_descriptions::kEnableUnifiedMultiDeviceSetupName, flag_descriptions::kEnableUnifiedMultiDeviceSetupName,
flag_descriptions::kEnableUnifiedMultiDeviceSetupDescription, kOsCrOS, flag_descriptions::kEnableUnifiedMultiDeviceSetupDescription, kOsCrOS,
FEATURE_VALUE_TYPE(features::kEnableUnifiedMultiDeviceSetup)}, FEATURE_VALUE_TYPE(chromeos::features::kEnableUnifiedMultiDeviceSetup)},
{"enable-video-player-chromecast-support", {"enable-video-player-chromecast-support",
flag_descriptions::kVideoPlayerChromecastSupportName, flag_descriptions::kVideoPlayerChromecastSupportName,
flag_descriptions::kVideoPlayerChromecastSupportDescription, kOsCrOS, flag_descriptions::kVideoPlayerChromecastSupportDescription, kOsCrOS,
......
...@@ -146,6 +146,7 @@ ...@@ -146,6 +146,7 @@
#include "chromeos/account_manager/account_manager.h" #include "chromeos/account_manager/account_manager.h"
#include "chromeos/account_manager/account_manager_factory.h" #include "chromeos/account_manager/account_manager_factory.h"
#include "chromeos/assistant/buildflags.h" #include "chromeos/assistant/buildflags.h"
#include "chromeos/chromeos_features.h"
#include "chromeos/services/multidevice_setup/multidevice_setup_service.h" #include "chromeos/services/multidevice_setup/multidevice_setup_service.h"
#include "chromeos/services/multidevice_setup/public/mojom/constants.mojom.h" #include "chromeos/services/multidevice_setup/public/mojom/constants.mojom.h"
#include "chromeos/services/multidevice_setup/public/mojom/multidevice_setup.mojom.h" #include "chromeos/services/multidevice_setup/public/mojom/multidevice_setup.mojom.h"
...@@ -1148,7 +1149,8 @@ void ProfileImpl::RegisterInProcessServices(StaticServiceMap* services) { ...@@ -1148,7 +1149,8 @@ void ProfileImpl::RegisterInProcessServices(StaticServiceMap* services) {
} }
#endif #endif
if (base::FeatureList::IsEnabled(features::kEnableUnifiedMultiDeviceSetup)) { if (base::FeatureList::IsEnabled(
chromeos::features::kEnableUnifiedMultiDeviceSetup)) {
service_manager::EmbeddedServiceInfo info; service_manager::EmbeddedServiceInfo info;
info.task_runner = base::ThreadTaskRunnerHandle::Get(); info.task_runner = base::ThreadTaskRunnerHandle::Get();
info.factory = base::BindRepeating([] { info.factory = base::BindRepeating([] {
......
...@@ -215,16 +215,6 @@ const base::Feature kDownloadsLocationChange{"DownloadsLocationChange", ...@@ -215,16 +215,6 @@ const base::Feature kDownloadsLocationChange{"DownloadsLocationChange",
base::FEATURE_DISABLED_BY_DEFAULT}; base::FEATURE_DISABLED_BY_DEFAULT};
#endif #endif
#if defined(OS_CHROMEOS)
// If enabled, the Chrome OS Settings UI will include a menu for the unified
// MultiDevice settings.
const base::Feature kEnableUnifiedMultiDeviceSettings{
"EnableUnifiedMultiDeviceSettings", base::FEATURE_DISABLED_BY_DEFAULT};
// Enable the device to setup all MultiDevice services in a single workflow.
const base::Feature kEnableUnifiedMultiDeviceSetup{
"EnableUnifiedMultiDeviceSetup", base::FEATURE_DISABLED_BY_DEFAULT};
#endif
// Enables Expect CT reporting, which sends reports for opted-in sites // Enables Expect CT reporting, which sends reports for opted-in sites
// that don't serve sufficient Certificate Transparency information. // that don't serve sufficient Certificate Transparency information.
const base::Feature kExpectCTReporting{"ExpectCTReporting", const base::Feature kExpectCTReporting{"ExpectCTReporting",
......
...@@ -118,11 +118,6 @@ extern const base::Feature kDownloadsForeground; ...@@ -118,11 +118,6 @@ extern const base::Feature kDownloadsForeground;
extern const base::Feature kDownloadsLocationChange; extern const base::Feature kDownloadsLocationChange;
#endif #endif
#if defined(OS_CHROMEOS)
extern const base::Feature kEnableUnifiedMultiDeviceSettings;
extern const base::Feature kEnableUnifiedMultiDeviceSetup;
#endif
extern const base::Feature kExpectCTReporting; extern const base::Feature kExpectCTReporting;
extern const base::Feature kExperimentalAppBanners; extern const base::Feature kExperimentalAppBanners;
......
...@@ -119,6 +119,8 @@ component("chromeos") { ...@@ -119,6 +119,8 @@ component("chromeos") {
"chromeos_constants.cc", "chromeos_constants.cc",
"chromeos_constants.h", "chromeos_constants.h",
"chromeos_export.h", "chromeos_export.h",
"chromeos_features.cc",
"chromeos_features.h",
"chromeos_paths.cc", "chromeos_paths.cc",
"chromeos_paths.h", "chromeos_paths.h",
"chromeos_pref_names.cc", "chromeos_pref_names.cc",
......
per-file chromeos_features.cc=*
per-file chromeos_features.h=*
per-file chromeos_switches.cc=* per-file chromeos_switches.cc=*
per-file chromeos_switches.h=* per-file chromeos_switches.h=*
per-file chromeos.gyp=* per-file chromeos.gyp=*
......
// Copyright 2018 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 "chromeos/chromeos_features.h"
namespace chromeos {
namespace features {
// If enabled, the Chrome OS Settings UI will include a menu for the unified
// MultiDevice settings.
const base::Feature kEnableUnifiedMultiDeviceSettings{
"EnableUnifiedMultiDeviceSettings", base::FEATURE_DISABLED_BY_DEFAULT};
// Enable the device to setup all MultiDevice services in a single workflow.
const base::Feature kEnableUnifiedMultiDeviceSetup{
"EnableUnifiedMultiDeviceSetup", base::FEATURE_DISABLED_BY_DEFAULT};
} // namespace features
} // namespace chromeos
// Copyright 2018 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.
#ifndef CHROMEOS_CHROMEOS_FEATURES_H_
#define CHROMEOS_CHROMEOS_FEATURES_H_
#include "base/feature_list.h"
#include "chromeos/chromeos_export.h"
namespace chromeos {
namespace features {
// All features in alphabetical order. The features should be documented
// alongside the definition of their values in the .cc file.
CHROMEOS_EXPORT extern const base::Feature kEnableUnifiedMultiDeviceSettings;
CHROMEOS_EXPORT extern const base::Feature kEnableUnifiedMultiDeviceSetup;
} // namespace features
} // namespace chromeos
#endif // CHROMEOS_CHROMEOS_FEATURES_H_
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