#include "extensions/common/permissions/usb_device_permission_data.h"
#include <stdint.h>
#include <limits>
#include <memory>
#include <string>
#include <tuple>
#include <vector>
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
#include "base/values.h"
#include "extensions/common/permissions/api_permission.h"
#include "extensions/common/permissions/usb_device_permission.h"
namespace extensions {
namespace {
const char kProductIdKey[] = …;
const char kVendorIdKey[] = …;
const char kInterfaceIdKey[] = …;
const char kInterfaceClassKey[] = …;
bool ExtractFromDict(const std::string& key,
const base::Value::Dict* dict_value,
int max,
int* value) { … }
}
UsbDevicePermissionData::UsbDevicePermissionData() = default;
UsbDevicePermissionData::UsbDevicePermissionData(int vendor_id,
int product_id,
int interface_id,
int interface_class)
: … { … }
bool UsbDevicePermissionData::Check(
const APIPermission::CheckParam* param) const { … }
std::unique_ptr<base::Value> UsbDevicePermissionData::ToValue() const { … }
bool UsbDevicePermissionData::FromValue(const base::Value* value) { … }
bool UsbDevicePermissionData::operator<(
const UsbDevicePermissionData& rhs) const { … }
bool UsbDevicePermissionData::operator==(
const UsbDevicePermissionData& rhs) const { … }
}