blob: 6dc8f2dfb30888d989e04fe8760f0271362d6579 [file] [log] [blame]
James Cookc8e0acd2025-10-27 20:08:541// Copyright 2025 The Chromium Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "chrome/browser/platform_util_internal.h"
6
7#include "build/build_config.h"
8#include "build/buildflag.h"
9
10#if BUILDFLAG(IS_CHROMEOS)
11#include "chrome/browser/ash/file_manager/open_util.h"
12#endif
13
14namespace platform_util::internal {
15namespace {
16
17bool g_shell_operations_allowed = true;
18
19} // namespace
20
21void DisableShellOperationsForTesting() {
22 g_shell_operations_allowed = false;
23
24#if BUILDFLAG(IS_CHROMEOS)
25 // Chrome OS also needs to customize file manager behavior.
26 file_manager::util::DisableShellOperationsForTesting();
27#endif
28}
29
30bool AreShellOperationsAllowed() {
31 return g_shell_operations_allowed;
32}
33
34} // namespace platform_util::internal