#ifndef CHROMEOS_ASH_EXPERIENCES_ARC_TEST_FAKE_ARC_SESSION_H_
#define CHROMEOS_ASH_EXPERIENCES_ARC_TEST_FAKE_ARC_SESSION_H_
#include <memory>
#include <string>
#include "chromeos/ash/experiences/arc/session/arc_session.h"
#include "chromeos/ash/experiences/arc/session/arc_stop_reason.h"
namespace cryptohome {
class Identification;
}
namespace arc {
class FakeArcSession : public ArcSession {
public:
FakeArcSession();
FakeArcSession(const FakeArcSession&) = delete;
FakeArcSession& operator=(const FakeArcSession&) = delete;
~FakeArcSession() override;
void StartMiniInstance() override;
void RequestUpgrade(UpgradeParams params) override;
void Stop() override;
bool IsStopRequested() override;
void OnShutdown() override;
void SetUserInfo(const cryptohome::Identification& cryptohome_id,
const std::string& hash,
const std::string& serial_number) override;
void SetDemoModeDelegate(
ArcClientAdapter::DemoModeDelegate* delegate) override;
void TrimVmMemory(TrimVmMemoryCallback callback, int page_limit) override;
void SetDefaultDeviceScaleFactor(float scale_factor) override;
void SetUseVirtioBlkData(bool use_virtio_blk_data) override;
void SetArcSignedIn(bool arc_signed_in) override;
void StopWithReason(ArcStopReason reason);
void EnableBootFailureEmulation(ArcStopReason reason);
void SuspendBoot();
void EmulateMiniContainerStart();
bool is_running() const { return running_; }
std::string upgrade_locale_param() const { return upgrade_locale_param_; }
int trim_vm_memory_count() const { return trim_vm_memory_count_; }
int last_trim_vm_page_limit() const { return last_trim_vm_page_limit_; }
void set_trim_result(bool success, const std::string& reason) {
trim_success_ = success;
trim_fail_reason = reason;
}
static std::unique_ptr<ArcSession> Create();
private:
bool boot_failure_emulation_enabled_ = false;
ArcStopReason boot_failure_reason_;
bool boot_suspended_ = false;
bool upgrade_requested_ = false;
bool running_ = false;
bool stop_requested_ = false;
std::string upgrade_locale_param_;
int trim_vm_memory_count_ = 0;
int last_trim_vm_page_limit_ = arc::ArcSession::kNoPageLimit;
bool trim_success_ = true;
std::string trim_fail_reason;
};
}
#endif