Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Side by Side Diff: Source/wtf/text/TextEncodingRegistry.h

Issue 261013007: Prevent direct use of "replacement" text encoding. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: MSVC fix Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/wtf/text/TextEncoding.cpp ('k') | Source/wtf/text/TextEncodingRegistry.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 30 matching lines...) Expand all
41 WTF_EXPORT PassOwnPtr<TextCodec> newTextCodec(const TextEncoding&); 41 WTF_EXPORT PassOwnPtr<TextCodec> newTextCodec(const TextEncoding&);
42 42
43 // Only TextEncoding should use the following functions directly. 43 // Only TextEncoding should use the following functions directly.
44 const char* atomicCanonicalTextEncodingName(const char* alias); 44 const char* atomicCanonicalTextEncodingName(const char* alias);
45 template <typename CharacterType> 45 template <typename CharacterType>
46 const char* atomicCanonicalTextEncodingName(const CharacterType*, size_t); 46 const char* atomicCanonicalTextEncodingName(const CharacterType*, size_t);
47 const char* atomicCanonicalTextEncodingName(const String&); 47 const char* atomicCanonicalTextEncodingName(const String&);
48 bool noExtendedTextEncodingNameUsed(); 48 bool noExtendedTextEncodingNameUsed();
49 bool isJapaneseEncoding(const char* canonicalEncodingName); 49 bool isJapaneseEncoding(const char* canonicalEncodingName);
50 bool shouldShowBackslashAsCurrencySymbolIn(const char* canonicalEncodingName); 50 bool shouldShowBackslashAsCurrencySymbolIn(const char* canonicalEncodingName);
51 bool isReplacementEncoding(const char* alias);
52 bool isReplacementEncoding(const String& alias);
51 53
52 #ifndef NDEBUG 54 #ifndef NDEBUG
53 void dumpTextEncodingNameMap(); 55 void dumpTextEncodingNameMap();
54 #endif 56 #endif
55 57
56 } // namespace WTF 58 } // namespace WTF
57 59
58 using WTF::newTextCodec; 60 using WTF::newTextCodec;
59 using WTF::atomicCanonicalTextEncodingName; 61 using WTF::atomicCanonicalTextEncodingName;
60 using WTF::noExtendedTextEncodingNameUsed; 62 using WTF::noExtendedTextEncodingNameUsed;
61 using WTF::isJapaneseEncoding; 63 using WTF::isJapaneseEncoding;
62 using WTF::shouldShowBackslashAsCurrencySymbolIn; 64 using WTF::shouldShowBackslashAsCurrencySymbolIn;
63 #ifndef NDEBUG 65 #ifndef NDEBUG
64 using WTF::dumpTextEncodingNameMap; 66 using WTF::dumpTextEncodingNameMap;
65 #endif 67 #endif
66 68
67 #endif // TextEncodingRegistry_h 69 #endif // TextEncodingRegistry_h
OLDNEW
« no previous file with comments | « Source/wtf/text/TextEncoding.cpp ('k') | Source/wtf/text/TextEncodingRegistry.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698