| Index: third_party/WebKit/Source/wtf/text/TextEncodingRegistry.cpp
|
| diff --git a/third_party/WebKit/Source/wtf/text/TextEncodingRegistry.cpp b/third_party/WebKit/Source/wtf/text/TextEncodingRegistry.cpp
|
| index 78394e484806d4b0e997fd370ae5b5a4e6034eda..69e25e99ce1828888ff4095d4b3e31e8387eba03 100644
|
| --- a/third_party/WebKit/Source/wtf/text/TextEncodingRegistry.cpp
|
| +++ b/third_party/WebKit/Source/wtf/text/TextEncodingRegistry.cpp
|
| @@ -313,4 +313,20 @@ void dumpTextEncodingNameMap() {
|
| }
|
| #endif
|
|
|
| +Vector<String> getEncodingNamesForTesting() {
|
| + if (!textEncodingNameMap)
|
| + buildBaseTextCodecMaps();
|
| + MutexLocker lock(encodingRegistryMutex());
|
| + if (!atomicDidExtendTextCodecMaps()) {
|
| + extendTextCodecMaps();
|
| + atomicSetDidExtendTextCodecMaps();
|
| + }
|
| + Vector<String> encodings;
|
| + for (const auto& it : *textCodecMap) {
|
| + if (strcmp(it.key, "replacement"))
|
| + encodings.append(it.key);
|
| + }
|
| + return encodings;
|
| +}
|
| +
|
| } // namespace WTF
|
|
|