Set caches directory on Fuchsia (#18321)
diff --git a/fml/platform/fuchsia/paths_fuchsia.cc b/fml/platform/fuchsia/paths_fuchsia.cc index 1b03307..e26b32d 100644 --- a/fml/platform/fuchsia/paths_fuchsia.cc +++ b/fml/platform/fuchsia/paths_fuchsia.cc
@@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "flutter/fml/file.h" #include "flutter/fml/paths.h" namespace fml { @@ -12,8 +13,7 @@ } fml::UniqueFD GetCachesDirectory() { - // Unsupported on this platform. - return {}; + return OpenDirectory("/cache", false, fml::FilePermission::kRead); } } // namespace paths
diff --git a/shell/platform/fuchsia/flutter/meta/flutter_aot_product_runner.cmx b/shell/platform/fuchsia/flutter/meta/flutter_aot_product_runner.cmx index 914c22b..16232df 100644 --- a/shell/platform/fuchsia/flutter/meta/flutter_aot_product_runner.cmx +++ b/shell/platform/fuchsia/flutter/meta/flutter_aot_product_runner.cmx
@@ -6,7 +6,8 @@ "features": [ "config-data", "root-ssl-certificates", - "vulkan" + "vulkan", + "isolated-cache-storage" ], "services": [ "fuchsia.accessibility.SettingsManager",
diff --git a/shell/platform/fuchsia/flutter/meta/flutter_aot_runner.cmx b/shell/platform/fuchsia/flutter/meta/flutter_aot_runner.cmx index 11ba40d..4c49f57 100644 --- a/shell/platform/fuchsia/flutter/meta/flutter_aot_runner.cmx +++ b/shell/platform/fuchsia/flutter/meta/flutter_aot_runner.cmx
@@ -6,7 +6,8 @@ "features": [ "config-data", "root-ssl-certificates", - "vulkan" + "vulkan", + "isolated-cache-storage" ], "services": [ "fuchsia.accessibility.SettingsManager",
diff --git a/shell/platform/fuchsia/flutter/meta/flutter_jit_product_runner.cmx b/shell/platform/fuchsia/flutter/meta/flutter_jit_product_runner.cmx index af0c724..e66eda1 100644 --- a/shell/platform/fuchsia/flutter/meta/flutter_jit_product_runner.cmx +++ b/shell/platform/fuchsia/flutter/meta/flutter_jit_product_runner.cmx
@@ -7,7 +7,8 @@ "config-data", "deprecated-ambient-replace-as-executable", "root-ssl-certificates", - "vulkan" + "vulkan", + "isolated-cache-storage" ], "services": [ "fuchsia.accessibility.SettingsManager",
diff --git a/shell/platform/fuchsia/flutter/meta/flutter_jit_runner.cmx b/shell/platform/fuchsia/flutter/meta/flutter_jit_runner.cmx index af0c724..e66eda1 100644 --- a/shell/platform/fuchsia/flutter/meta/flutter_jit_runner.cmx +++ b/shell/platform/fuchsia/flutter/meta/flutter_jit_runner.cmx
@@ -7,7 +7,8 @@ "config-data", "deprecated-ambient-replace-as-executable", "root-ssl-certificates", - "vulkan" + "vulkan", + "isolated-cache-storage" ], "services": [ "fuchsia.accessibility.SettingsManager",
diff --git a/testing/fuchsia/meta/fuchsia_test.cmx b/testing/fuchsia/meta/fuchsia_test.cmx index 7239603..2d9addc 100644 --- a/testing/fuchsia/meta/fuchsia_test.cmx +++ b/testing/fuchsia/meta/fuchsia_test.cmx
@@ -5,7 +5,8 @@ "sandbox": { "features": [ "vulkan", - "deprecated-ambient-replace-as-executable" + "deprecated-ambient-replace-as-executable", + "isolated-cache-storage" ], "services": [ "fuchsia.accessibility.semantics.SemanticsManager",