#ifndef CHROME_BROWSER_ASH_FILE_SYSTEM_PROVIDER_OPERATIONS_TEST_UTIL_H_
#define CHROME_BROWSER_ASH_FILE_SYSTEM_PROVIDER_OPERATIONS_TEST_UTIL_H_
#include <memory>
#include <vector>
#include "base/files/file.h"
#include "chrome/browser/ash/file_system_provider/request_dispatcher.h"
namespace extensions {
struct Event;
}
namespace ash::file_system_provider::operations::util {
class LoggingDispatchEventImpl : public RequestDispatcher {
public:
explicit LoggingDispatchEventImpl(bool dispatch_reply);
LoggingDispatchEventImpl(const LoggingDispatchEventImpl&) = delete;
LoggingDispatchEventImpl& operator=(const LoggingDispatchEventImpl&) = delete;
~LoggingDispatchEventImpl() override;
bool DispatchRequest(int request_id,
std::optional<std::string> file_system_id,
std::unique_ptr<extensions::Event> event) override;
void CancelRequest(int request_id,
std::optional<std::string> file_system_id) override;
std::vector<std::unique_ptr<extensions::Event>>& events() { return events_; }
private:
std::vector<std::unique_ptr<extensions::Event>> events_;
bool dispatch_reply_;
};
typedef std::vector<base::File::Error> StatusCallbackLog;
void LogStatusCallback(StatusCallbackLog* log, base::File::Error result);
}
#endif