mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-16 15:36:12 -04:00
Ban use of std::filesystem from nearby/sharing.
PiperOrigin-RevId: 762119139
This commit is contained in:
committed by
Copybara-Service
parent
ec7dbcbf30
commit
96a274a58f
+1
-1
@@ -671,10 +671,10 @@ cc_test(
|
||||
srcs = ["nearby_sharing_settings_test.cc"],
|
||||
deps = [
|
||||
":nearby_sharing_service",
|
||||
"//internal/base:files",
|
||||
"//internal/platform/implementation/g3", # fixdeps: keep
|
||||
"//internal/test",
|
||||
"//sharing/common",
|
||||
"//sharing/common:compatible_u8_string",
|
||||
"//sharing/common:enum",
|
||||
"//sharing/internal/test:nearby_test",
|
||||
"//sharing/local_device_data:test_support",
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
#include "sharing/nearby_sharing_settings.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <filesystem> // NOLINT(build/c++17)
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@@ -27,9 +26,9 @@
|
||||
#include "absl/synchronization/notification.h"
|
||||
#include "absl/time/clock.h"
|
||||
#include "absl/time/time.h"
|
||||
#include "internal/base/files.h"
|
||||
#include "internal/test/fake_device_info.h"
|
||||
#include "internal/test/fake_task_runner.h"
|
||||
#include "sharing/common/compatible_u8_string.h"
|
||||
#include "sharing/common/nearby_share_enums.h"
|
||||
#include "sharing/common/nearby_share_prefs.h"
|
||||
#include "sharing/internal/test/fake_context.h"
|
||||
@@ -170,8 +169,7 @@ class NearbyShareSettingsTest : public ::testing::Test {
|
||||
|
||||
TEST_F(NearbyShareSettingsTest, GetAndSetCustomSavePath) {
|
||||
absl::Notification notification;
|
||||
std::string save_path =
|
||||
GetCompatibleU8String(std::filesystem::temp_directory_path().u8string());
|
||||
std::string save_path = GetTemporaryDirectory()->ToString();
|
||||
settings()->SetCustomSavePathAsync(save_path,
|
||||
[&]() { notification.Notify(); });
|
||||
Flush();
|
||||
|
||||
Reference in New Issue
Block a user