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

Side by Side Diff: third_party/WebKit/Source/wtf/text/TextEncodingRegistry.cpp

Issue 1807853003: Deprecate some macros in wtf/Assertions.h in favor of base/logging.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 9 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
OLDNEW
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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 const char* oldAtomicName = textEncodingNameMap->get(alias); 143 const char* oldAtomicName = textEncodingNameMap->get(alias);
144 if (!oldAtomicName) 144 if (!oldAtomicName)
145 return; 145 return;
146 if (oldAtomicName == atomicName) 146 if (oldAtomicName == atomicName)
147 return; 147 return;
148 // Keep the warning silent about one case where we know this will happen. 148 // Keep the warning silent about one case where we know this will happen.
149 if (strcmp(alias, "ISO-8859-8-I") == 0 149 if (strcmp(alias, "ISO-8859-8-I") == 0
150 && strcmp(oldAtomicName, "ISO-8859-8-I") == 0 150 && strcmp(oldAtomicName, "ISO-8859-8-I") == 0
151 && strcasecmp(atomicName, "iso-8859-8") == 0) 151 && strcasecmp(atomicName, "iso-8859-8") == 0)
152 return; 152 return;
153 WTF_LOG_ERROR("alias %s maps to %s already, but someone is trying to make it map to %s", alias, oldAtomicName, atomicName); 153 LOG(ERROR) << "alias " << alias << " maps to " << oldAtomicName << " already , but someone is trying to make it map to " << atomicName;
154 } 154 }
155 155
156 #endif 156 #endif
157 157
158 static bool isUndesiredAlias(const char* alias) 158 static bool isUndesiredAlias(const char* alias)
159 { 159 {
160 // Reject aliases with version numbers that are supported by some back-ends (such as "ISO_2022,locale=ja,version=0" in ICU). 160 // Reject aliases with version numbers that are supported by some back-ends (such as "ISO_2022,locale=ja,version=0" in ICU).
161 for (const char* p = alias; *p; ++p) { 161 for (const char* p = alias; *p; ++p) {
162 if (*p == ',') 162 if (*p == ',')
163 return true; 163 return true;
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 MutexLocker lock(encodingRegistryMutex()); 325 MutexLocker lock(encodingRegistryMutex());
326 326
327 TextEncodingNameMap::const_iterator it = textEncodingNameMap->begin(); 327 TextEncodingNameMap::const_iterator it = textEncodingNameMap->begin();
328 TextEncodingNameMap::const_iterator end = textEncodingNameMap->end(); 328 TextEncodingNameMap::const_iterator end = textEncodingNameMap->end();
329 for (; it != end; ++it) 329 for (; it != end; ++it)
330 fprintf(stderr, "'%s' => '%s'\n", it->key, it->value); 330 fprintf(stderr, "'%s' => '%s'\n", it->key, it->value);
331 } 331 }
332 #endif 332 #endif
333 333
334 } // namespace WTF 334 } // namespace WTF
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698