refactor: ginify SystemPreferences (#24675)

This commit is contained in:
Jeremy Rose 2020-07-28 11:03:30 -07:00 committed by GitHub
parent 3f45fc24bb
commit 362da77c0a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 76 additions and 70 deletions

View file

@ -167,8 +167,8 @@ std::string SystemPreferences::GetColor(gin_helper::ErrorThrower thrower,
}
std::string SystemPreferences::GetMediaAccessStatus(
const std::string& media_type,
gin_helper::Arguments* args) {
gin_helper::ErrorThrower thrower,
const std::string& media_type) {
if (media_type == "camera") {
return ConvertDeviceAccessStatus(
GetDeviceAccessStatus(DeviceClass::DeviceClass_VideoCapture));
@ -179,7 +179,7 @@ std::string SystemPreferences::GetMediaAccessStatus(
return ConvertDeviceAccessStatus(
DeviceAccessStatus::DeviceAccessStatus_Allowed);
} else {
args->ThrowError("Invalid media type");
thrower.ThrowError("Invalid media type");
return std::string();
}
}