From 7f37a0a1303618b56ec2dc4eb3d523e0667449e8 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Fri, 19 Oct 2018 14:39:54 -0400 Subject: [PATCH] Fix substitution of localized strings for directory listings (issue #2412) --- libcef/common/net/net_resource_provider.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libcef/common/net/net_resource_provider.cc b/libcef/common/net/net_resource_provider.cc index 43a9b1887..d40e77da3 100644 --- a/libcef/common/net/net_resource_provider.cc +++ b/libcef/common/net/net_resource_provider.cc @@ -3,8 +3,13 @@ // can be found in the LICENSE file. #include "libcef/common/net/net_resource_provider.h" -#include "libcef/common/content_client.h" + +#include "chrome/common/net/net_resource_provider.h" base::StringPiece NetResourceProvider(int key) { - return CefContentClient::Get()->GetDataResource(key, ui::SCALE_FACTOR_NONE); + // Chrome performs substitution of localized strings for directory listings. + base::StringPiece value = chrome_common_net::NetResourceProvider(key); + if (value.empty()) + LOG(ERROR) << "No data resource available for id " << key; + return value; }