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

Unified Diff: Source/core/loader/FormSubmission.cpp

Issue 123003002: Make calls to AtomicString(const String&) explicit in loader/ and fetch/ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 6 years, 12 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/loader/FormSubmission.h ('k') | Source/core/loader/FrameFetchContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/loader/FormSubmission.cpp
diff --git a/Source/core/loader/FormSubmission.cpp b/Source/core/loader/FormSubmission.cpp
index dc6a9eef4b269b97f193282dda2e7cebfd3973d9..6bfd7105b19a0407b66ef452b82421a9105a4aaa 100644
--- a/Source/core/loader/FormSubmission.cpp
+++ b/Source/core/loader/FormSubmission.cpp
@@ -86,13 +86,13 @@ void FormSubmission::Attributes::parseAction(const String& action)
m_action = stripLeadingAndTrailingHTMLSpaces(action);
}
-String FormSubmission::Attributes::parseEncodingType(const String& type)
+AtomicString FormSubmission::Attributes::parseEncodingType(const String& type)
{
if (equalIgnoringCase(type, "multipart/form-data"))
- return "multipart/form-data";
+ return AtomicString("multipart/form-data", AtomicString::ConstructFromLiteral);
if (equalIgnoringCase(type, "text/plain"))
- return "text/plain";
- return "application/x-www-form-urlencoded";
+ return AtomicString("text/plain", AtomicString::ConstructFromLiteral);
+ return AtomicString("application/x-www-form-urlencoded", AtomicString::ConstructFromLiteral);
}
void FormSubmission::Attributes::updateEncodingType(const String& type)
@@ -140,7 +140,7 @@ void FormSubmission::Attributes::copyFrom(const Attributes& other)
m_acceptCharset = other.m_acceptCharset;
}
-inline FormSubmission::FormSubmission(Method method, const KURL& action, const AtomicString& target, const String& contentType, PassRefPtr<FormState> state, PassRefPtr<FormData> data, const String& boundary, PassRefPtr<Event> event)
+inline FormSubmission::FormSubmission(Method method, const KURL& action, const AtomicString& target, const AtomicString& contentType, PassRefPtr<FormState> state, PassRefPtr<FormData> data, const String& boundary, PassRefPtr<Event> event)
: m_method(method)
, m_action(action)
, m_target(target)
@@ -193,12 +193,12 @@ PassRefPtr<FormSubmission> FormSubmission::create(HTMLFormElement* form, const A
KURL actionURL = document.completeURL(copiedAttributes.action().isEmpty() ? document.url().string() : copiedAttributes.action());
bool isMailtoForm = actionURL.protocolIs("mailto");
bool isMultiPartForm = false;
- String encodingType = copiedAttributes.encodingType();
+ AtomicString encodingType = copiedAttributes.encodingType();
if (copiedAttributes.method() == PostMethod) {
isMultiPartForm = copiedAttributes.isMultiPartForm();
if (isMultiPartForm && isMailtoForm) {
- encodingType = "application/x-www-form-urlencoded";
+ encodingType = AtomicString("application/x-www-form-urlencoded", AtomicString::ConstructFromLiteral);
isMultiPartForm = false;
}
}
@@ -259,7 +259,7 @@ void FormSubmission::populateFrameLoadRequest(FrameLoadRequest& frameRequest)
frameRequest.setFrameName(m_target);
if (!m_referrer.isEmpty())
- frameRequest.resourceRequest().setHTTPReferrer(m_referrer);
+ frameRequest.resourceRequest().setHTTPReferrer(AtomicString(m_referrer));
if (m_method == FormSubmission::PostMethod) {
frameRequest.resourceRequest().setHTTPMethod("POST");
@@ -273,7 +273,7 @@ void FormSubmission::populateFrameLoadRequest(FrameLoadRequest& frameRequest)
}
frameRequest.resourceRequest().setURL(requestURL());
- FrameLoader::addHTTPOriginIfNeeded(frameRequest.resourceRequest(), m_origin);
+ FrameLoader::addHTTPOriginIfNeeded(frameRequest.resourceRequest(), AtomicString(m_origin));
}
}
« no previous file with comments | « Source/core/loader/FormSubmission.h ('k') | Source/core/loader/FrameFetchContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698