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

Unified Diff: Source/WebCore/xml/XMLHttpRequest.cpp

Issue 13650009: Remove Dashboard support and supporting files. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix compiler error due to misspelling in code "Dashbard" Created 7 years, 9 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/WebCore/xml/XMLHttpRequest.h ('k') | Source/WebKit/chromium/features.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/xml/XMLHttpRequest.cpp
diff --git a/Source/WebCore/xml/XMLHttpRequest.cpp b/Source/WebCore/xml/XMLHttpRequest.cpp
index 1f0fe2964b141b8a43d2b7435edd88d0d96a2fb3..4819adaa577383d2e6b5b7d41f1a0329ee75eb3e 100644
--- a/Source/WebCore/xml/XMLHttpRequest.cpp
+++ b/Source/WebCore/xml/XMLHttpRequest.cpp
@@ -222,16 +222,6 @@ SecurityOrigin* XMLHttpRequest::securityOrigin() const
return m_securityOrigin ? m_securityOrigin.get() : scriptExecutionContext()->securityOrigin();
}
-#if ENABLE(DASHBOARD_SUPPORT)
-bool XMLHttpRequest::usesDashboardBackwardCompatibilityMode() const
-{
- if (scriptExecutionContext()->isWorkerContext())
- return false;
- Settings* settings = document()->settings();
- return settings && settings->usesDashboardBackwardCompatibilityMode();
-}
-#endif
-
XMLHttpRequest::State XMLHttpRequest::readyState() const
{
return m_state;
@@ -598,13 +588,8 @@ void XMLHttpRequest::send(Document* document, ExceptionCode& ec)
if (m_method != "GET" && m_method != "HEAD" && m_url.protocolIsInHTTPFamily()) {
String contentType = getRequestHeader("Content-Type");
if (contentType.isEmpty()) {
-#if ENABLE(DASHBOARD_SUPPORT)
- if (usesDashboardBackwardCompatibilityMode())
- setRequestHeaderInternal("Content-Type", "application/x-www-form-urlencoded");
- else
-#endif
- // FIXME: this should include the charset used for encoding.
- setRequestHeaderInternal("Content-Type", "application/xml");
+ // FIXME: this should include the charset used for encoding.
+ setRequestHeaderInternal("Content-Type", "application/xml");
}
// FIXME: According to XMLHttpRequest Level 2, this should use the Document.innerHTML algorithm
@@ -629,12 +614,7 @@ void XMLHttpRequest::send(const String& body, ExceptionCode& ec)
if (!body.isNull() && m_method != "GET" && m_method != "HEAD" && m_url.protocolIsInHTTPFamily()) {
String contentType = getRequestHeader("Content-Type");
if (contentType.isEmpty()) {
-#if ENABLE(DASHBOARD_SUPPORT)
- if (usesDashboardBackwardCompatibilityMode())
- setRequestHeaderInternal("Content-Type", "application/x-www-form-urlencoded");
- else
-#endif
- setRequestHeaderInternal("Content-Type", "application/xml");
+ setRequestHeaderInternal("Content-Type", "application/xml");
} else {
replaceCharsetInMediaType(contentType, "UTF-8");
m_requestHeaders.set("Content-Type", contentType);
@@ -959,11 +939,6 @@ void XMLHttpRequest::overrideMimeType(const String& override)
void XMLHttpRequest::setRequestHeader(const AtomicString& name, const String& value, ExceptionCode& ec)
{
if (m_state != OPENED || m_loader) {
-#if ENABLE(DASHBOARD_SUPPORT)
- if (usesDashboardBackwardCompatibilityMode())
- return;
-#endif
-
ec = INVALID_STATE_ERR;
return;
}
@@ -973,7 +948,7 @@ void XMLHttpRequest::setRequestHeader(const AtomicString& name, const String& va
return;
}
- // A privileged script (e.g. a Dashboard widget) can set any headers.
+ // A privileged script can set any headers.
if (!securityOrigin()->canLoadLocalResources() && !isAllowedHTTPHeader(name)) {
logConsoleError(scriptExecutionContext(), "Refused to set unsafe header \"" + name + "\"");
return;
« no previous file with comments | « Source/WebCore/xml/XMLHttpRequest.h ('k') | Source/WebKit/chromium/features.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698