1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
|
// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/browser/file_system_access/features.h"
#include "base/feature_list.h"
#include "build/build_config.h"
namespace content::features {
// TODO(crbug.com/1370433): Remove this flag eventually.
// When enabled, drag-and-dropped files and directories will be checked against
// the File System Access blocklist. This feature was disabled since it broke
// some applications.
BASE_FEATURE(kFileSystemAccessDragAndDropCheckBlocklist,
"FileSystemAccessDragAndDropCheckBlocklist",
base::FEATURE_DISABLED_BY_DEFAULT);
// TODO(crbug.com/1381621): Remove this flag eventually.
// When enabled, move() will result in a promise rejection when the specified
// destination to move to exists. This feature was disabled since it does not
// match standard POSIX behavior. See discussion at
// https://github.com/whatwg/fs/pull/10#issuecomment-1322993643.
BASE_FEATURE(kFileSystemAccessDoNotOverwriteOnMove,
"FileSystemAccessDoNotOverwriteOnMove",
base::FEATURE_DISABLED_BY_DEFAULT);
// TODO(crbug.com/1140805): Remove this flag eventually.
// When enabled, move() supports moving local files (i.e. that do not live in
// the OPFS).
BASE_FEATURE(kFileSystemAccessMoveLocalFiles,
"FileSystemAccessMoveLocalFiles",
base::FEATURE_ENABLED_BY_DEFAULT);
// TODO(crbug.com/1114923): Remove this flag eventually.
// When enabled, the remove() method is enabled. Otherwise, throws a
// NotSupportedError DomException.
BASE_FEATURE(kFileSystemAccessRemove,
"FileSystemAccessRemove",
base::FEATURE_ENABLED_BY_DEFAULT);
// TODO(crbug.com/1394837): Remove this flag eventually.
// When enabled, a user gesture is required to rename a file if the site does
// not have write access to the parent. See http://b/254157070 for more context.
BASE_FEATURE(kFileSystemAccessRenameWithoutParentAccessRequiresUserActivation,
"FileSystemAccessRenameWithoutParentAccessRequiresUserActivation",
base::FEATURE_ENABLED_BY_DEFAULT);
// TODO(crbug.com/1247850): Remove this flag eventually.
// When enabled, move operations within the same file system that do not change
// the file extension will not be subject to safe browsing checks.
BASE_FEATURE(kFileSystemAccessSkipAfterWriteChecksIfUnchangingExtension,
"FileSystemAccessSkipAfterWriteChecksIfUnchangingExtension",
base::FEATURE_ENABLED_BY_DEFAULT);
// TODO(crbug.com/1421735): Remove this flag eventually.
// When enabled, GetFile() and GetEntries() on the directory handle resolve
// symbolic link (if any) and check the path against the blocklis, on POSIX.
// This feature was disabled since it broke some applications.
BASE_FEATURE(kFileSystemAccessDirectoryIterationSymbolicLinkCheck,
"FileSystemAccessDirectoryIterationSymbolicLinkCheck",
base::FEATURE_DISABLED_BY_DEFAULT);
#if BUILDFLAG(IS_MAC)
// TODO(crbug.com/1413443): Remove this flag eventually.
// When enabled, createWritable({ keepExistingData:true }) will create a swap
// file using APFS's built-in support for copy-on-write files instead of copying
// over the file's contents manually.
BASE_FEATURE(kFileSystemAccessCowSwapFile,
"FileSystemAccessCowSwapFile",
base::FEATURE_ENABLED_BY_DEFAULT);
#endif // BUILDFLAG(IS_MAC)
} // namespace content::features
|