summaryrefslogtreecommitdiffstats
path: root/Source/WebKit/android/WebCoreSupport
diff options
context:
space:
mode:
authorSelim Gurun <sgurun@google.com>2012-03-14 16:07:10 -0700
committerSelim Gurun <sgurun@google.com>2012-03-14 16:22:08 -0700
commit0927546d815284c21672db126b40c4f1e891f76b (patch)
tree55ea478fa13b1f8dc115becee3f443884a7a35e1 /Source/WebKit/android/WebCoreSupport
parentb3f4d3af0b06dc168453641e249d0cb9eec9b570 (diff)
downloadexternal_webkit-0927546d815284c21672db126b40c4f1e891f76b.zip
external_webkit-0927546d815284c21672db126b40c4f1e891f76b.tar.gz
external_webkit-0927546d815284c21672db126b40c4f1e891f76b.tar.bz2
Remove gmail specific mime code from webview
Bug: 6019611 Remove gmail specific mime code from webview so the query parameters can be passed to asset files. The changes were added in honeycomb timeframe (see commit 7d2f6c10941c9083e9ec30fb08444a5755ff8bc9). The changes seem not in use anymore (tested for some attachments following the original commit above), also talked to gmail team and they also do not think it is in use. Also it seems a hack to modify webview for one app in such a way. Get rid of an unused private variable. Change-Id: Ic74414eaa0d6a2be77eefdd0b8a053f655b285ff
Diffstat (limited to 'Source/WebKit/android/WebCoreSupport')
-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;