#include "chrome/test/chromedriver/chrome/device_manager.h"
#include <vector>
#include "base/check.h"
#include "base/containers/contains.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/functional/callback_helpers.h"
#include "base/ranges/algorithm.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "chrome/test/chromedriver/chrome/adb.h"
#include "chrome/test/chromedriver/chrome/status.h"
const char kChromeCmdLineFile[] = …;
Device::Device(const std::string& device_serial,
Adb* adb,
base::OnceCallback<void()> release_callback)
: … { … }
Device::~Device() { … }
bool IsValidExecName(const std::string& exec_name) { … }
Status Device::SetUp(const std::string& package,
const std::string& activity,
const std::string& process,
const std::string& device_socket,
const std::string& exec_name,
const std::string& args,
bool use_running_app,
bool keep_app_data_dir,
int* devtools_port) { … }
Status Device::ForwardDevtoolsPort(const std::string& package,
const std::string& process,
std::string* device_socket,
int* devtools_port) { … }
Status Device::TearDown() { … }
DeviceManager::DeviceManager(Adb* adb) : … { … }
DeviceManager::~DeviceManager() { … }
Status DeviceManager::AcquireDevice(std::unique_ptr<Device>* device) { … }
Status DeviceManager::AcquireSpecificDevice(const std::string& device_serial,
std::unique_ptr<Device>* device) { … }
void DeviceManager::ReleaseDevice(const std::string& device_serial) { … }
Device* DeviceManager::LockDevice(const std::string& device_serial) { … }
bool DeviceManager::IsDeviceLocked(const std::string& device_serial) { … }