#include "components/storage_monitor/test_storage_monitor.h"
#include <utility>
#include "base/functional/bind.h"
#include "base/run_loop.h"
#include "base/synchronization/waitable_event.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "components/storage_monitor/storage_info.h"
#if BUILDFLAG(IS_CHROMEOS_ASH)
#include "components/storage_monitor/test_media_transfer_protocol_manager_chromeos.h"
#endif
namespace storage_monitor {
TestStorageMonitor::TestStorageMonitor() : … { … }
TestStorageMonitor::~TestStorageMonitor() { … }
TestStorageMonitor* TestStorageMonitor::CreateAndInstall() { … }
TestStorageMonitor* TestStorageMonitor::CreateForBrowserTests() { … }
void TestStorageMonitor::SyncInitialize() { … }
void TestStorageMonitor::Init() { … }
void TestStorageMonitor::MarkInitialized() { … }
bool TestStorageMonitor::GetStorageInfoForPath(
const base::FilePath& path,
StorageInfo* device_info) const { … }
#if BUILDFLAG(IS_WIN)
bool TestStorageMonitor::GetMTPStorageInfoFromDeviceId(
const std::string& storage_device_id,
std::wstring* device_location,
std::wstring* storage_object_id) const {
return false;
}
#endif
#if BUILDFLAG(IS_CHROMEOS_ASH)
device::mojom::MtpManager*
TestStorageMonitor::media_transfer_protocol_manager() {
return media_transfer_protocol_manager_.get();
}
#endif
StorageMonitor::Receiver* TestStorageMonitor::receiver() const { … }
void TestStorageMonitor::EjectDevice(
const std::string& device_id,
base::OnceCallback<void(EjectStatus)> callback) { … }
void TestStorageMonitor::AddRemovablePath(const base::FilePath& path) { … }
}