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

Side by Side Diff: sky/engine/wtf/text/Base64.cpp

Issue 1206763002: Really remove config.h (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « sky/engine/wtf/text/AtomicStringTest.cpp ('k') | sky/engine/wtf/text/CString.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) 2000-2001 Dawit Alemayehu <adawit@kde.org> 2 Copyright (C) 2000-2001 Dawit Alemayehu <adawit@kde.org>
3 Copyright (C) 2006 Alexey Proskuryakov <ap@webkit.org> 3 Copyright (C) 2006 Alexey Proskuryakov <ap@webkit.org>
4 Copyright (C) 2007, 2008 Apple Inc. All rights reserved. 4 Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
5 Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> 5 Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com>
6 6
7 This program is free software; you can redistribute it and/or modify 7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU Lesser General Public License (LGPL) 8 it under the terms of the GNU Lesser General Public License (LGPL)
9 version 2 as published by the Free Software Foundation. 9 version 2 as published by the Free Software Foundation.
10 10
11 This program is distributed in the hope that it will be useful, 11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details. 14 GNU General Public License for more details.
15 15
16 You should have received a copy of the GNU Library General Public 16 You should have received a copy of the GNU Library General Public
17 License along with this program; if not, write to the Free Software 17 License along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US A. 18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US A.
19 19
20 This code is based on the java implementation in HTTPClient 20 This code is based on the java implementation in HTTPClient
21 package by Ronald Tschalär Copyright (C) 1996-1999. 21 package by Ronald Tschalär Copyright (C) 1996-1999.
22 */ 22 */
23 23
24 #include "sky/engine/config.h"
25 #include "sky/engine/wtf/text/Base64.h" 24 #include "sky/engine/wtf/text/Base64.h"
26 25
27 #include <limits.h> 26 #include <limits.h>
28 #include "sky/engine/wtf/StringExtras.h" 27 #include "sky/engine/wtf/StringExtras.h"
29 28
30 namespace WTF { 29 namespace WTF {
31 30
32 static const char base64EncMap[64] = { 31 static const char base64EncMap[64] = {
33 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 32 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48,
34 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 33 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50,
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 bool base64Decode(const String& in, Vector<char>& out, CharacterMatchFunctionPtr shouldIgnoreCharacter, Base64DecodePolicy policy) 230 bool base64Decode(const String& in, Vector<char>& out, CharacterMatchFunctionPtr shouldIgnoreCharacter, Base64DecodePolicy policy)
232 { 231 {
233 if (in.isEmpty()) 232 if (in.isEmpty())
234 return base64DecodeInternal<LChar>(0, 0, out, shouldIgnoreCharacter, pol icy); 233 return base64DecodeInternal<LChar>(0, 0, out, shouldIgnoreCharacter, pol icy);
235 if (in.is8Bit()) 234 if (in.is8Bit())
236 return base64DecodeInternal<LChar>(in.characters8(), in.length(), out, s houldIgnoreCharacter, policy); 235 return base64DecodeInternal<LChar>(in.characters8(), in.length(), out, s houldIgnoreCharacter, policy);
237 return base64DecodeInternal<UChar>(in.characters16(), in.length(), out, shou ldIgnoreCharacter, policy); 236 return base64DecodeInternal<UChar>(in.characters16(), in.length(), out, shou ldIgnoreCharacter, policy);
238 } 237 }
239 238
240 } // namespace WTF 239 } // namespace WTF
OLDNEW
« no previous file with comments | « sky/engine/wtf/text/AtomicStringTest.cpp ('k') | sky/engine/wtf/text/CString.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698