From 2595cb5698860cdbf253f5cb79362cc0d08cee96 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Fri, 16 Aug 2019 23:55:34 +0900 Subject: [PATCH] fix: compilation failure after chromium upgrade (#19787) --- shell/browser/api/atom_api_web_request_ns.cc | 5 +---- shell/common/api/atom_api_native_theme.cc | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/shell/browser/api/atom_api_web_request_ns.cc b/shell/browser/api/atom_api_web_request_ns.cc index ba72242837..b1f6ca768f 100644 --- a/shell/browser/api/atom_api_web_request_ns.cc +++ b/shell/browser/api/atom_api_web_request_ns.cc @@ -105,12 +105,9 @@ void ToDictionary(gin::Dictionary* details, extensions::WebRequestInfo* info) { details->Set("url", info->url); details->Set("method", info->method); details->Set("timestamp", base::Time::Now().ToDoubleT() * 1000); + details->Set("resourceType", info->type); if (!info->response_ip.empty()) details->Set("ip", info->response_ip); - if (info->type.has_value()) - details->Set("resourceType", info->type.value()); - else - details->Set("resourceType", base::StringPiece("other")); if (info->response_headers) { details->Set("fromCache", info->response_from_cache); details->Set("responseHeaders", info->response_headers.get()); diff --git a/shell/common/api/atom_api_native_theme.cc b/shell/common/api/atom_api_native_theme.cc index 385d0daaa0..a917d1fe3c 100644 --- a/shell/common/api/atom_api_native_theme.cc +++ b/shell/common/api/atom_api_native_theme.cc @@ -29,7 +29,7 @@ void NativeTheme::OnNativeThemeUpdated(ui::NativeTheme* theme) { } bool NativeTheme::ShouldUseDarkColors() { - return theme_->SystemDarkModeEnabled(); + return theme_->ShouldUseDarkColors(); } bool NativeTheme::ShouldUseHighContrastColors() {