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

Side by Side Diff: third_party/WebKit/Source/platform/network/FormDataEncoder.cpp

Issue 2622363005: Migrate WTF::Vector::append() to ::push_back() in WTF::HexNumber (Closed)
Patch Set: remove template, rely on function overload resolution for Vector-specific methods Created 3 years, 10 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
7 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. 7 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved.
8 * (http://www.torchmobile.com/) 8 * (http://www.torchmobile.com/)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 30 matching lines...) Expand all
41 static inline void append(Vector<char>& buffer, const char* string) { 41 static inline void append(Vector<char>& buffer, const char* string) {
42 buffer.append(string, strlen(string)); 42 buffer.append(string, strlen(string));
43 } 43 }
44 44
45 static inline void append(Vector<char>& buffer, const CString& string) { 45 static inline void append(Vector<char>& buffer, const CString& string) {
46 buffer.append(string.data(), string.length()); 46 buffer.append(string.data(), string.length());
47 } 47 }
48 48
49 static inline void appendPercentEncoded(Vector<char>& buffer, unsigned char c) { 49 static inline void appendPercentEncoded(Vector<char>& buffer, unsigned char c) {
50 append(buffer, '%'); 50 append(buffer, '%');
51 appendByteAsHex(c, buffer); 51 HexNumber::appendByteAsHex(c, buffer);
52 } 52 }
53 53
54 static void appendQuotedString(Vector<char>& buffer, const CString& string) { 54 static void appendQuotedString(Vector<char>& buffer, const CString& string) {
55 // Append a string as a quoted value, escaping quotes and line breaks. 55 // Append a string as a quoted value, escaping quotes and line breaks.
56 // FIXME: Is it correct to use percent escaping here? Other browsers do not 56 // FIXME: Is it correct to use percent escaping here? Other browsers do not
57 // encode these characters yet, so we should test popular servers to find out 57 // encode these characters yet, so we should test popular servers to find out
58 // if there is an encoding form they can handle. 58 // if there is an encoding form they can handle.
59 size_t length = string.length(); 59 size_t length = string.length();
60 for (size_t i = 0; i < length; ++i) { 60 for (size_t i = 0; i < length; ++i) {
61 char c = string.data()[i]; 61 char c = string.data()[i];
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 appendPercentEncoded(buffer, c); 228 appendPercentEncoded(buffer, c);
229 } 229 }
230 } else { 230 } else {
231 appendPercentEncoded(buffer, c); 231 appendPercentEncoded(buffer, c);
232 } 232 }
233 } 233 }
234 } 234 }
235 } 235 }
236 236
237 } // namespace blink 237 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/LoggingCanvas.cpp ('k') | third_party/WebKit/Source/wtf/HexNumber.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698