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

Side by Side Diff: third_party/WebKit/Source/core/loader/FormSubmission.cpp

Issue 2383403002: Reflow comments in core/loader (Closed)
Patch Set: yhirano comments Created 4 years, 2 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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 static_cast<int64_t>(currentTime() * 1000000.0); 61 static_cast<int64_t>(currentTime() * 1000000.0);
62 return ++nextIdentifier; 62 return ++nextIdentifier;
63 } 63 }
64 64
65 static void appendMailtoPostFormDataToURL(KURL& url, 65 static void appendMailtoPostFormDataToURL(KURL& url,
66 const EncodedFormData& data, 66 const EncodedFormData& data,
67 const String& encodingType) { 67 const String& encodingType) {
68 String body = data.flattenToString(); 68 String body = data.flattenToString();
69 69
70 if (equalIgnoringCase(encodingType, "text/plain")) { 70 if (equalIgnoringCase(encodingType, "text/plain")) {
71 // Convention seems to be to decode, and s/&/\r\n/. Also, spaces are encoded as %20. 71 // Convention seems to be to decode, and s/&/\r\n/. Also, spaces are encoded
72 // as %20.
72 body = decodeURLEscapeSequences( 73 body = decodeURLEscapeSequences(
73 body.replace('&', "\r\n").replace('+', ' ') + "\r\n"); 74 body.replace('&', "\r\n").replace('+', ' ') + "\r\n");
74 } 75 }
75 76
76 Vector<char> bodyData; 77 Vector<char> bodyData;
77 bodyData.append("body=", 5); 78 bodyData.append("body=", 5);
78 FormDataEncoder::encodeStringAsFormData(bodyData, body.utf8(), 79 FormDataEncoder::encodeStringAsFormData(bodyData, body.utf8(),
79 FormDataEncoder::NormalizeCRLF); 80 FormDataEncoder::NormalizeCRLF);
80 body = String(bodyData.data(), bodyData.size()).replace('+', "%20"); 81 body = String(bodyData.data(), bodyData.size()).replace('+', "%20");
81 82
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 305
305 frameRequest.resourceRequest().setURL(requestURL()); 306 frameRequest.resourceRequest().setURL(requestURL());
306 307
307 frameRequest.setTriggeringEvent(m_event); 308 frameRequest.setTriggeringEvent(m_event);
308 frameRequest.setForm(m_form); 309 frameRequest.setForm(m_form);
309 310
310 return frameRequest; 311 return frameRequest;
311 } 312 }
312 313
313 } // namespace blink 314 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/loader/EmptyClients.h ('k') | third_party/WebKit/Source/core/loader/FrameFetchContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698