summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSelim Gurun <sgurun@google.com>2012-03-14 17:37:20 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-03-14 17:37:20 -0700
commit640bfa989e82aad4ff79ff786f31a6962c37d8fd (patch)
treee3bc5cf70f0538290680ef51f60d4a002ccf1110
parentfcfac6621e0fc97bd358b892cdf3acaea4ca33a6 (diff)
parent0927546d815284c21672db126b40c4f1e891f76b (diff)
downloadexternal_webkit-640bfa989e82aad4ff79ff786f31a6962c37d8fd.zip
external_webkit-640bfa989e82aad4ff79ff786f31a6962c37d8fd.tar.gz
external_webkit-640bfa989e82aad4ff79ff786f31a6962c37d8fd.tar.bz2
Merge "Remove gmail specific mime code from webview"
-rw-r--r--Source/WebKit/android/WebCoreSupport/WebRequest.cpp14
-rw-r--r--Source/WebKit/android/WebCoreSupport/WebRequest.h1
2 files changed, 3 insertions, 12 deletions
diff --git a/Source/WebKit/android/WebCoreSupport/WebRequest.cpp b/Source/WebKit/android/WebCoreSupport/WebRequest.cpp
index fea7afa..4c479e3 100644
--- a/Source/WebKit/android/WebCoreSupport/WebRequest.cpp
+++ b/Source/WebKit/android/WebCoreSupport/WebRequest.cpp
@@ -81,7 +81,6 @@ base::LazyInstance<RequestPackageName> s_packageName(base::LINKER_INITIALIZED);
WebRequest::WebRequest(WebUrlLoaderClient* loader, const WebResourceRequest& webResourceRequest)
: m_urlLoader(loader)
- , m_androidUrl(false)
, m_url(webResourceRequest.url())
, m_userAgent(webResourceRequest.userAgent())
, m_loadState(Created)
@@ -108,7 +107,6 @@ WebRequest::WebRequest(WebUrlLoaderClient* loader, const WebResourceRequest& web
WebRequest::WebRequest(WebUrlLoaderClient* loader, const WebResourceRequest& webResourceRequest, UrlInterceptResponse* intercept)
: m_urlLoader(loader)
, m_interceptResponse(intercept)
- , m_androidUrl(true)
, m_url(webResourceRequest.url())
, m_userAgent(webResourceRequest.userAgent())
, m_loadState(Created)
@@ -293,15 +291,9 @@ void WebRequest::handleInterceptedURL()
// Get the MIME type from the URL. "text/html" is a last resort, hopefully overridden.
std::string mimeType("text/html");
if (mime == "") {
- // Gmail appends the MIME to the end of the URL, with a ? separator.
- size_t mimeTypeIndex = m_url.find_last_of('?');
- if (mimeTypeIndex != std::string::npos) {
- mimeType.assign(m_url.begin() + mimeTypeIndex + 1, m_url.end());
- } else {
- // Get the MIME type from the file extension, if any.
- FilePath path(m_url);
- net::GetMimeTypeFromFile(path, &mimeType);
- }
+ // Get the MIME type from the file extension, if any.
+ FilePath path(m_url);
+ net::GetMimeTypeFromFile(path, &mimeType);
} else {
// Set from the intercept response.
mimeType = mime;
diff --git a/Source/WebKit/android/WebCoreSupport/WebRequest.h b/Source/WebKit/android/WebCoreSupport/WebRequest.h
index 285e577..d9054e9 100644
--- a/Source/WebKit/android/WebCoreSupport/WebRequest.h
+++ b/Source/WebKit/android/WebCoreSupport/WebRequest.h
@@ -107,7 +107,6 @@ private:
OwnPtr<net::URLRequest> m_request;
scoped_refptr<net::IOBuffer> m_networkBuffer;
scoped_ptr<UrlInterceptResponse> m_interceptResponse;
- bool m_androidUrl;
std::string m_url;
std::string m_userAgent;
LoadState m_loadState;