Commit 201fbf94 authored by Sam McNally's avatar Sam McNally Committed by Commit Bot

Add DriveFS to about:flags.

Also move the DriveFS feature to a more common location in
chromeos/chromeos_features.h.

Bug: 859800
Change-Id: Iffffea69c4874ae0583c67e8a8e6a9b50a4951e4
Reviewed-on: https://chromium-review.googlesource.com/1124211Reviewed-by: default avatarStuart Langley <slangley@chromium.org>
Reviewed-by: default avatarNoel Gordon <noel@chromium.org>
Commit-Queue: Sam McNally <sammc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#572459}
parent fe47c49e
......@@ -4041,6 +4041,12 @@ const FeatureEntry kFeatureEntries[] = {
flag_descriptions::kGamepadPollingRateDescription, kOsDesktop,
MULTI_VALUE_TYPE(kGamepadPollingRateChoices)},
#if defined(OS_CHROMEOS)
{"enable-drive-fs", flag_descriptions::kEnableDriveFsName,
flag_descriptions::kEnableDriveFsDescription, kOsCrOS,
FEATURE_VALUE_TYPE(chromeos::features::kDriveFs)},
#endif // OS_CHROMEOS
// NOTE: Adding a new flag requires adding a corresponding entry to enum
// "LoginCustomFlags" in tools/metrics/histograms/enums.xml. See "Flag
// Histograms" in tools/metrics/histograms/README.md (run the
......
......@@ -32,6 +32,7 @@
#include "chrome/browser/signin/signin_manager_factory.h"
#include "chrome/common/pref_names.h"
#include "chrome/grit/generated_resources.h"
#include "chromeos/chromeos_features.h"
#include "components/drive/chromeos/file_cache.h"
#include "components/drive/chromeos/file_system.h"
#include "components/drive/chromeos/resource_metadata.h"
......@@ -207,8 +208,6 @@ FileError InitializeMetadata(
} // namespace
const base::Feature kDriveFs{"DriveFS", base::FEATURE_DISABLED_BY_DEFAULT};
// Observes drive disable Preference's change.
class DriveIntegrationService::PreferenceWatcher {
public:
......@@ -341,7 +340,7 @@ DriveIntegrationService::DriveIntegrationService(
: util::GetCacheRootPath(profile)),
preference_watcher_(preference_watcher),
drivefs_holder_(
base::FeatureList::IsEnabled(kDriveFs)
base::FeatureList::IsEnabled(chromeos::features::kDriveFs)
? std::make_unique<DriveFsHolder>(
profile_,
base::BindRepeating(&DriveIntegrationService::
......
......@@ -54,8 +54,6 @@ class ResourceMetadata;
class ResourceMetadataStorage;
} // namespace internal
extern const base::Feature kDriveFs;
// Interface for classes that need to observe events from
// DriveIntegrationService. All events are notified on UI thread.
class DriveIntegrationServiceObserver {
......
......@@ -31,6 +31,7 @@
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/common/extensions/api/file_manager_private.h"
#include "chrome/common/extensions/api/file_manager_private_internal.h"
#include "chromeos/chromeos_features.h"
#include "chromeos/disks/disk_mount_manager.h"
#include "components/drive/chromeos/file_system_interface.h"
#include "components/drive/drive.pb.h"
......@@ -460,7 +461,7 @@ bool FileManagerPrivateGetSizeStatsFunction::RunAsync() {
return false;
if (volume->type() == file_manager::VOLUME_TYPE_GOOGLE_DRIVE &&
!base::FeatureList::IsEnabled(drive::kDriveFs)) {
!base::FeatureList::IsEnabled(chromeos::features::kDriveFs)) {
drive::FileSystemInterface* file_system =
drive::util::GetFileSystemByProfile(GetProfile());
if (!file_system) {
......
......@@ -35,6 +35,7 @@
#include "chrome/common/chrome_features.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
#include "chromeos/chromeos_features.h"
#include "chromeos/chromeos_switches.h"
#include "chromeos/components/drivefs/drivefs_host.h"
#include "chromeos/components/drivefs/fake_drivefs.h"
......@@ -885,7 +886,7 @@ void FileManagerBrowserTestBase::SetUpCommandLine(
enabled_features.emplace_back(features::kExperimentalCrostiniUI);
}
if (IsDriveFsTest()) {
enabled_features.emplace_back(drive::kDriveFs);
enabled_features.emplace_back(chromeos::features::kDriveFs);
}
feature_list_.InitWithFeatures(enabled_features, {});
......@@ -1225,7 +1226,7 @@ void FileManagerBrowserTestBase::OnCommand(const std::string& name,
drive::DriveIntegrationService*
FileManagerBrowserTestBase::CreateDriveIntegrationService(Profile* profile) {
if (base::FeatureList::IsEnabled(drive::kDriveFs)) {
if (base::FeatureList::IsEnabled(chromeos::features::kDriveFs)) {
drive_volumes_[profile->GetOriginalProfile()] =
std::make_unique<DriveFsTestVolume>(profile->GetOriginalProfile());
} else {
......
......@@ -3001,6 +3001,10 @@ const char kEnableDragTabsInTabletModeName[] =
const char kEnableDragTabsInTabletModeDescription[] =
"Allows the user to drag the tabs out of a browser window in tablet mode.";
const char kEnableDriveFsName[] = "Enable DriveFS";
const char kEnableDriveFsDescription[] =
"Enables use of the new DriveFS-based Drive sync client.";
const char kEnableEhvInputName[] =
"Emoji, handwriting and voice input on opt-in IME menu";
const char kEnableEhvInputDescription[] =
......
......@@ -1843,6 +1843,9 @@ extern const char kEnableDragAppsInTabletModeDescription[];
extern const char kEnableDragTabsInTabletModeName[];
extern const char kEnableDragTabsInTabletModeDescription[];
extern const char kEnableDriveFsName[];
extern const char kEnableDriveFsDescription[];
extern const char kEnableEhvInputName[];
extern const char kEnableEhvInputDescription[];
......
......@@ -12,6 +12,9 @@ namespace features {
const base::Feature kAndroidMessagesIntegration{
"AndroidMessagesIntegration", base::FEATURE_DISABLED_BY_DEFAULT};
// If enabled, DriveFS will be used for Drive sync.
const base::Feature kDriveFs{"DriveFS", base::FEATURE_DISABLED_BY_DEFAULT};
// If enabled, the Chrome OS Settings UI will include a menu for the unified
// MultiDevice settings.
const base::Feature kEnableUnifiedMultiDeviceSettings{
......
......@@ -16,6 +16,7 @@ namespace features {
// alongside the definition of their values in the .cc file.
CHROMEOS_EXPORT extern const base::Feature kAndroidMessagesIntegration;
CHROMEOS_EXPORT extern const base::Feature kDriveFs;
CHROMEOS_EXPORT extern const base::Feature kEnableUnifiedMultiDeviceSettings;
CHROMEOS_EXPORT extern const base::Feature kEnableUnifiedMultiDeviceSetup;
......
......@@ -27867,6 +27867,7 @@ from previous Chrome versions.
<int value="-918900957" label="AutofillCreditCardAssist:disabled"/>
<int value="-918618075" label="enable-service-worker"/>
<int value="-914210146" label="enable-web-based-signin"/>
<int value="-913294939" label="DriveFS:enabled"/>
<int value="-912456561" label="MidiManagerWinrt:enabled"/>
<int value="-908421850" label="PointerEvent:enabled"/>
<int value="-907234795" label="NewAudioRenderingMixingStrategy:disabled"/>
......@@ -27959,6 +27960,7 @@ from previous Chrome versions.
<int value="-746328467" label="ExpensiveBackgroundTimerThrottling:disabled"/>
<int value="-744159181" label="disable-spdy-proxy-dev-auth-origin"/>
<int value="-743103250" label="enable-linkable-ephemeral-apps"/>
<int value="-742469530" label="DriveFS:disabled"/>
<int value="-741806604" label="DownloadsUi:disabled"/>
<int value="-738957187" label="OmniboxUIExperimentSwapTitleAndUrl:disabled"/>
<int value="-726892130" label="AndroidMessagesIntegration:disabled"/>
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