Skip to content

Commit

Permalink
chore: update chrome.runtime.getPlatformInfo impl (electron#39392)
Browse files Browse the repository at this point in the history
chore: update chrome.runtime.getPlatformInfo impl
  • Loading branch information
codebytere authored and MrHuangJser committed Dec 11, 2023
1 parent abb8efe commit 52f421f
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,13 @@ void ElectronRuntimeAPIDelegate::ReloadExtension(
bool ElectronRuntimeAPIDelegate::CheckForUpdates(
const std::string& extension_id,
UpdateCheckCallback callback) {
LOG(INFO) << "chrome.runtime.requestUpdateCheck is not supported in Electron";
return false;
}

void ElectronRuntimeAPIDelegate::OpenURL(const GURL& uninstall_url) {}
void ElectronRuntimeAPIDelegate::OpenURL(const GURL& uninstall_url) {
LOG(INFO) << "chrome.runtime.openURL is not supported in Electron";
}

bool ElectronRuntimeAPIDelegate::GetPlatformInfo(PlatformInfo* info) {
const char* os = update_client::UpdateQueryParams::GetOS();
Expand Down Expand Up @@ -74,9 +77,6 @@ bool ElectronRuntimeAPIDelegate::GetPlatformInfo(PlatformInfo* info) {
const char* nacl_arch = update_client::UpdateQueryParams::GetNaclArch();
if (strcmp(nacl_arch, "arm") == 0) {
info->nacl_arch = extensions::api::runtime::PlatformNaclArch::kArm;
} else if (strcmp(nacl_arch, "arm64") == 0) {
// Use ARM for ARM64 NaCl, as ARM64 NaCl is not available.
info->nacl_arch = extensions::api::runtime::PlatformNaclArch::kArm;
} else if (strcmp(nacl_arch, "x86-32") == 0) {
info->nacl_arch = extensions::api::runtime::PlatformNaclArch::kX86_32;
} else if (strcmp(nacl_arch, "x86-64") == 0) {
Expand Down

0 comments on commit 52f421f

Please sign in to comment.