mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-02-21 14:40:49 +01:00
Fix substitution of localized strings for directory listings (issue #2412)
This commit is contained in:
parent
678fa78c28
commit
5e6699b223
@ -3,8 +3,13 @@
|
|||||||
// can be found in the LICENSE file.
|
// can be found in the LICENSE file.
|
||||||
|
|
||||||
#include "libcef/common/net/net_resource_provider.h"
|
#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) {
|
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;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user