| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2011 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2007-2009 Torch Mobile, Inc. | 3 * Copyright (C) 2007-2009 Torch Mobile, Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 | 306 |
| 307 MutexLocker lock(encodingRegistryMutex()); | 307 MutexLocker lock(encodingRegistryMutex()); |
| 308 | 308 |
| 309 TextEncodingNameMap::const_iterator it = textEncodingNameMap->begin(); | 309 TextEncodingNameMap::const_iterator it = textEncodingNameMap->begin(); |
| 310 TextEncodingNameMap::const_iterator end = textEncodingNameMap->end(); | 310 TextEncodingNameMap::const_iterator end = textEncodingNameMap->end(); |
| 311 for (; it != end; ++it) | 311 for (; it != end; ++it) |
| 312 fprintf(stderr, "'%s' => '%s'\n", it->key, it->value); | 312 fprintf(stderr, "'%s' => '%s'\n", it->key, it->value); |
| 313 } | 313 } |
| 314 #endif | 314 #endif |
| 315 | 315 |
| 316 Vector<String> getEncodingNamesForTesting() { |
| 317 if (!textEncodingNameMap) |
| 318 buildBaseTextCodecMaps(); |
| 319 MutexLocker lock(encodingRegistryMutex()); |
| 320 if (!atomicDidExtendTextCodecMaps()) { |
| 321 extendTextCodecMaps(); |
| 322 atomicSetDidExtendTextCodecMaps(); |
| 323 } |
| 324 Vector<String> encodings; |
| 325 for (const auto& it : *textCodecMap) { |
| 326 if (strcmp(it.key, "replacement")) |
| 327 encodings.append(it.key); |
| 328 } |
| 329 return encodings; |
| 330 } |
| 331 |
| 316 } // namespace WTF | 332 } // namespace WTF |
| OLD | NEW |