diff --git a/shell/browser/extensions/electron_extensions_browser_client.cc b/shell/browser/extensions/electron_extensions_browser_client.cc index e3d4e5338ad2..5604a0d45fe5 100644 --- a/shell/browser/extensions/electron_extensions_browser_client.cc +++ b/shell/browser/extensions/electron_extensions_browser_client.cc @@ -178,7 +178,7 @@ base::FilePath ElectronExtensionsBrowserClient::GetBundleResourcePath( if (!chrome_resources_path.IsParent(extension_resources_path)) return base::FilePath(); - const base::FilePath request_relative_path = + base::FilePath request_relative_path = extensions::file_util::ExtensionURLToRelativeFilePath(request.url); if (!ExtensionsBrowserClient::Get() ->GetComponentExtensionResourceManager() diff --git a/shell/common/logging.cc b/shell/common/logging.cc index 304648ef6e0e..7121444dea1a 100644 --- a/shell/common/logging.cc +++ b/shell/common/logging.cc @@ -30,16 +30,13 @@ base::FilePath GetLogFileName(const base::CommandLine& command_line) { if (!filename.empty()) return base::FilePath::FromUTF8Unsafe(filename); - const base::FilePath log_filename(FILE_PATH_LITERAL("electron_debug.log")); - base::FilePath log_path; + auto log_filename = base::FilePath{FILE_PATH_LITERAL("electron_debug.log")}; - if (base::PathService::Get(chrome::DIR_LOGS, &log_path)) { - log_path = log_path.Append(log_filename); - return log_path; - } else { - // error with path service, just use some default file somewhere - return log_filename; - } + if (base::FilePath path; base::PathService::Get(chrome::DIR_LOGS, &path)) + return path.Append(log_filename); + + // error with path service, just use some default file somewhere + return log_filename; } namespace {