Fix substitution of localized strings for directory listings (issue #2412)
This commit is contained in:
parent
cd24143111
commit
7f37a0a130
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue