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

Unified Diff: Source/wtf/text/Base64.h

Issue 58143002: WindowBase64::atob() does not remove space characters from input (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix nits Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/page/Page.cpp ('k') | Source/wtf/text/Base64.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/text/Base64.h
diff --git a/Source/wtf/text/Base64.h b/Source/wtf/text/Base64.h
index 3d02f98bd8377d75967d6b4dbfac14ee01dca884..3b1825e473e152636000b0cf90dcf4eab7140da4 100644
--- a/Source/wtf/text/Base64.h
+++ b/Source/wtf/text/Base64.h
@@ -40,10 +40,8 @@ enum Base64EncodePolicy {
};
enum Base64DecodePolicy {
- Base64FailOnInvalidCharacterOrExcessPadding,
- Base64FailOnInvalidCharacter,
- Base64IgnoreWhitespace,
- Base64IgnoreInvalidCharacters
+ Base64DoNotValidatePadding,
+ Base64ValidatePadding
};
WTF_EXPORT void base64Encode(const char*, unsigned, Vector<char>&, Base64EncodePolicy = Base64DoNotInsertLFs);
@@ -53,10 +51,10 @@ WTF_EXPORT String base64Encode(const char*, unsigned, Base64EncodePolicy = Base6
WTF_EXPORT String base64Encode(const Vector<char>&, Base64EncodePolicy = Base64DoNotInsertLFs);
WTF_EXPORT String base64Encode(const CString&, Base64EncodePolicy = Base64DoNotInsertLFs);
-WTF_EXPORT bool base64Decode(const String&, Vector<char>&, Base64DecodePolicy = Base64FailOnInvalidCharacter);
-WTF_EXPORT bool base64Decode(const Vector<char>&, Vector<char>&, Base64DecodePolicy = Base64FailOnInvalidCharacter);
-WTF_EXPORT bool base64Decode(const char*, unsigned, Vector<char>&, Base64DecodePolicy = Base64FailOnInvalidCharacter);
-WTF_EXPORT bool base64Decode(const UChar*, unsigned, Vector<char>&, Base64DecodePolicy = Base64FailOnInvalidCharacter);
+WTF_EXPORT bool base64Decode(const String&, Vector<char>&, CharacterMatchFunctionPtr shouldIgnoreCharacter = 0, Base64DecodePolicy = Base64DoNotValidatePadding);
+WTF_EXPORT bool base64Decode(const Vector<char>&, Vector<char>&, CharacterMatchFunctionPtr shouldIgnoreCharacter = 0, Base64DecodePolicy = Base64DoNotValidatePadding);
+WTF_EXPORT bool base64Decode(const char*, unsigned, Vector<char>&, CharacterMatchFunctionPtr shouldIgnoreCharacter = 0, Base64DecodePolicy = Base64DoNotValidatePadding);
+WTF_EXPORT bool base64Decode(const UChar*, unsigned, Vector<char>&, CharacterMatchFunctionPtr shouldIgnoreCharacter = 0, Base64DecodePolicy = Base64DoNotValidatePadding);
inline void base64Encode(const Vector<char>& in, Vector<char>& out, Base64EncodePolicy policy)
{
@@ -84,10 +82,8 @@ using WTF::Base64EncodePolicy;
using WTF::Base64DoNotInsertLFs;
using WTF::Base64InsertLFs;
using WTF::Base64DecodePolicy;
-using WTF::Base64FailOnInvalidCharacterOrExcessPadding;
-using WTF::Base64FailOnInvalidCharacter;
-using WTF::Base64IgnoreWhitespace;
-using WTF::Base64IgnoreInvalidCharacters;
+using WTF::Base64DoNotValidatePadding;
+using WTF::Base64ValidatePadding;
using WTF::base64Encode;
using WTF::base64Decode;
« no previous file with comments | « Source/core/page/Page.cpp ('k') | Source/wtf/text/Base64.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698