summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/renderer_host/buffered_resource_handler.cc8
-rw-r--r--chrome/browser/renderer_host/resource_dispatcher_host.cc3
-rw-r--r--chrome/browser/renderer_host/resource_dispatcher_host.h7
-rw-r--r--chrome/common/render_messages.h8
-rw-r--r--chrome/common/resource_dispatcher.cc5
-rw-r--r--chrome/common/resource_dispatcher.h1
-rw-r--r--chrome/common/resource_dispatcher_unittest.cc2
-rw-r--r--chrome/plugin/chrome_plugin_host.cc1
-rw-r--r--chrome/renderer/media/data_source_impl.cc1
-rw-r--r--chrome/renderer/renderer_glue.cc4
-rw-r--r--chrome/test/worker/test_worker_main.cc1
11 files changed, 2 insertions, 39 deletions
diff --git a/chrome/browser/renderer_host/buffered_resource_handler.cc b/chrome/browser/renderer_host/buffered_resource_handler.cc
index 3418666..e8a86ee 100644
--- a/chrome/browser/renderer_host/buffered_resource_handler.cc
+++ b/chrome/browser/renderer_host/buffered_resource_handler.cc
@@ -180,11 +180,6 @@ bool BufferedResourceHandler::ShouldBuffer(const GURL& url,
bool BufferedResourceHandler::KeepBuffering(int bytes_read) {
DCHECK(read_buffer_);
-
- ResourceDispatcherHost::ExtraRequestInfo* info =
- ResourceDispatcherHost::ExtraInfoForRequest(request_);
- DCHECK(info);
-
if (my_buffer_) {
// We are using our own buffer to read, update the main buffer.
CHECK(bytes_read + bytes_read_ < read_buffer_size_);
@@ -198,9 +193,6 @@ bool BufferedResourceHandler::KeepBuffering(int bytes_read) {
std::string type_hint, new_type;
request_->GetMimeType(&type_hint);
- if (type_hint.empty())
- type_hint = info->default_mime_type;
-
if (!net::SniffMimeType(read_buffer_->data(), bytes_read_,
request_->url(), type_hint, &new_type)) {
// SniffMimeType() returns false if there is not enough data to determine
diff --git a/chrome/browser/renderer_host/resource_dispatcher_host.cc b/chrome/browser/renderer_host/resource_dispatcher_host.cc
index 2cb0431..917cc5b 100644
--- a/chrome/browser/renderer_host/resource_dispatcher_host.cc
+++ b/chrome/browser/renderer_host/resource_dispatcher_host.cc
@@ -397,7 +397,6 @@ void ResourceDispatcherHost::BeginRequest(
request_id,
request_data.frame_origin,
request_data.main_frame_origin,
- request_data.default_mime_type,
request_data.resource_type,
upload_size);
extra_info->allow_download =
@@ -534,7 +533,6 @@ void ResourceDispatcherHost::BeginDownload(const GURL& url,
request_id_,
"null", // frame_origin
"null", // main_frame_origin
- "", // default_mime_type
ResourceType::SUB_RESOURCE,
0 /* upload_size */);
extra_info->allow_download = true;
@@ -589,7 +587,6 @@ void ResourceDispatcherHost::BeginSaveFile(const GURL& url,
request_id_,
"null", // frame_origin
"null", // main_frame_origin
- "", // default_mime_type
ResourceType::SUB_RESOURCE,
0 /* upload_size */);
// Just saving some resources we need, disallow downloading.
diff --git a/chrome/browser/renderer_host/resource_dispatcher_host.h b/chrome/browser/renderer_host/resource_dispatcher_host.h
index 07c532c..052c157 100644
--- a/chrome/browser/renderer_host/resource_dispatcher_host.h
+++ b/chrome/browser/renderer_host/resource_dispatcher_host.h
@@ -79,7 +79,6 @@ class ResourceDispatcherHost : public URLRequest::Delegate {
int request_id,
std::string frame_origin,
std::string main_frame_origin,
- std::string default_mime_type,
ResourceType::Type resource_type,
uint64 upload_size)
: resource_handler(handler),
@@ -94,7 +93,6 @@ class ResourceDispatcherHost : public URLRequest::Delegate {
pause_count(0),
frame_origin(frame_origin),
main_frame_origin(main_frame_origin),
- default_mime_type(default_mime_type),
resource_type(resource_type),
filter_policy(FilterPolicy::DONT_FILTER),
last_load_state(net::LOAD_STATE_IDLE),
@@ -143,11 +141,6 @@ class ResourceDispatcherHost : public URLRequest::Delegate {
// this request.
std::string main_frame_origin;
- // The MIME type to use if this request lacks a Content-Type response
- // header. If |default_mime_type| is "", then use the default sniffing
- // algorithm.
- std::string default_mime_type;
-
ResourceType::Type resource_type;
// Whether the content for this request should be filtered (on the renderer
diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h
index 77d56164..e4743a0 100644
--- a/chrome/common/render_messages.h
+++ b/chrome/common/render_messages.h
@@ -259,10 +259,6 @@ struct ViewHostMsg_Resource_Request {
// Additional HTTP request headers.
std::string headers;
- // The default MIME type to use if the response lacks a Content-Type header.
- // Use the empty string here if you don't want special MIME type handling.
- std::string default_mime_type;
-
// URLRequest load flags (0 by default).
int load_flags;
@@ -1222,7 +1218,6 @@ struct ParamTraits<ViewHostMsg_Resource_Request> {
WriteParam(m, p.frame_origin);
WriteParam(m, p.main_frame_origin);
WriteParam(m, p.headers);
- WriteParam(m, p.default_mime_type);
WriteParam(m, p.load_flags);
WriteParam(m, p.origin_pid);
WriteParam(m, p.resource_type);
@@ -1239,7 +1234,6 @@ struct ParamTraits<ViewHostMsg_Resource_Request> {
ReadParam(m, iter, &r->frame_origin) &&
ReadParam(m, iter, &r->main_frame_origin) &&
ReadParam(m, iter, &r->headers) &&
- ReadParam(m, iter, &r->default_mime_type) &&
ReadParam(m, iter, &r->load_flags) &&
ReadParam(m, iter, &r->origin_pid) &&
ReadParam(m, iter, &r->resource_type) &&
@@ -1259,8 +1253,6 @@ struct ParamTraits<ViewHostMsg_Resource_Request> {
l->append(L", ");
LogParam(p.main_frame_origin, l);
l->append(L", ");
- LogParam(p.default_mime_type, l);
- l->append(L", ");
LogParam(p.load_flags, l);
l->append(L", ");
LogParam(p.origin_pid, l);
diff --git a/chrome/common/resource_dispatcher.cc b/chrome/common/resource_dispatcher.cc
index c5712ea..c669d43 100644
--- a/chrome/common/resource_dispatcher.cc
+++ b/chrome/common/resource_dispatcher.cc
@@ -51,7 +51,6 @@ class IPCResourceLoaderBridge : public ResourceLoaderBridge {
const std::string& frame_origin,
const std::string& main_frame_origin,
const std::string& headers,
- const std::string& default_mime_type,
int load_flags,
int origin_pid,
ResourceType::Type resource_type,
@@ -106,7 +105,6 @@ IPCResourceLoaderBridge::IPCResourceLoaderBridge(
const std::string& frame_origin,
const std::string& main_frame_origin,
const std::string& headers,
- const std::string& default_mime_type,
int load_flags,
int origin_pid,
ResourceType::Type resource_type,
@@ -125,7 +123,6 @@ IPCResourceLoaderBridge::IPCResourceLoaderBridge(
request_.frame_origin = frame_origin;
request_.main_frame_origin = main_frame_origin;
request_.headers = headers;
- request_.default_mime_type = default_mime_type;
request_.load_flags = load_flags;
request_.origin_pid = origin_pid;
request_.resource_type = resource_type;
@@ -529,7 +526,6 @@ webkit_glue::ResourceLoaderBridge* ResourceDispatcher::CreateBridge(
const std::string& frame_origin,
const std::string& main_frame_origin,
const std::string& headers,
- const std::string& default_mime_type,
int flags,
int origin_pid,
ResourceType::Type resource_type,
@@ -539,7 +535,6 @@ webkit_glue::ResourceLoaderBridge* ResourceDispatcher::CreateBridge(
return new webkit_glue::IPCResourceLoaderBridge(this, method, url, policy_url,
referrer, frame_origin,
main_frame_origin, headers,
- default_mime_type,
flags, origin_pid,
resource_type,
request_context,
diff --git a/chrome/common/resource_dispatcher.h b/chrome/common/resource_dispatcher.h
index bc511e94..8ad20fe 100644
--- a/chrome/common/resource_dispatcher.h
+++ b/chrome/common/resource_dispatcher.h
@@ -42,7 +42,6 @@ class ResourceDispatcher {
const std::string& frame_origin,
const std::string& main_frame_origin,
const std::string& headers,
- const std::string& default_mime_type,
int load_flags,
int origin_pid,
ResourceType::Type resource_type,
diff --git a/chrome/common/resource_dispatcher_unittest.cc b/chrome/common/resource_dispatcher_unittest.cc
index e079364..e378dd3 100644
--- a/chrome/common/resource_dispatcher_unittest.cc
+++ b/chrome/common/resource_dispatcher_unittest.cc
@@ -155,7 +155,7 @@ TEST_F(ResourceDispatcherTest, RoundTrip) {
TestRequestCallback callback;
ResourceLoaderBridge* bridge =
dispatcher_->CreateBridge("GET", GURL(test_page_url), GURL(test_page_url),
- GURL(), "null", "null", std::string(), "", 0, 0,
+ GURL(), "null", "null", std::string(), 0, 0,
ResourceType::SUB_RESOURCE, 0,
WebAppCacheContext::kNoAppCacheContextId,
MSG_ROUTING_CONTROL);
diff --git a/chrome/plugin/chrome_plugin_host.cc b/chrome/plugin/chrome_plugin_host.cc
index c63ef76..fcba5f6 100644
--- a/chrome/plugin/chrome_plugin_host.cc
+++ b/chrome/plugin/chrome_plugin_host.cc
@@ -149,7 +149,6 @@ class PluginRequestHandlerProxy
"null", // frame_origin
"null", // main_frame_origin
extra_headers_,
- "", // default_mime_type
load_flags_,
GetCurrentProcessId(),
ResourceType::OBJECT,
diff --git a/chrome/renderer/media/data_source_impl.cc b/chrome/renderer/media/data_source_impl.cc
index 20aee22..4046f83 100644
--- a/chrome/renderer/media/data_source_impl.cc
+++ b/chrome/renderer/media/data_source_impl.cc
@@ -209,7 +209,6 @@ void DataSourceImpl::OnInitialize(std::string uri) {
"null", // TODO(abarth): provide frame_origin
"null", // TODO(abarth): provide main_frame_origin
std::string(), // Provide no header.
- "", // default_mime_type
// Prefer to load from cache, also enable downloading the file, the
// resource will be saved to a single response data file if it's possible.
net::LOAD_PREFERRING_CACHE | net::LOAD_ENABLE_DOWNLOAD_FILE,
diff --git a/chrome/renderer/renderer_glue.cc b/chrome/renderer/renderer_glue.cc
index d072dce..68f4fce 100644
--- a/chrome/renderer/renderer_glue.cc
+++ b/chrome/renderer/renderer_glue.cc
@@ -228,7 +228,6 @@ ResourceLoaderBridge* ResourceLoaderBridge::Create(
const std::string& frame_origin,
const std::string& main_frame_origin,
const std::string& headers,
- const std::string& default_mime_type,
int load_flags,
int origin_pid,
ResourceType::Type resource_type,
@@ -237,8 +236,7 @@ ResourceLoaderBridge* ResourceLoaderBridge::Create(
ResourceDispatcher* dispatch = RenderThread::current()->resource_dispatcher();
return dispatch->CreateBridge(method, url, policy_url, referrer,
frame_origin, main_frame_origin, headers,
- default_mime_type, load_flags, origin_pid,
- resource_type, 0,
+ load_flags, origin_pid, resource_type, 0,
app_cache_context_id, routing_id);
}
diff --git a/chrome/test/worker/test_worker_main.cc b/chrome/test/worker/test_worker_main.cc
index 81b3aca..4cc434a 100644
--- a/chrome/test/worker/test_worker_main.cc
+++ b/chrome/test/worker/test_worker_main.cc
@@ -53,7 +53,6 @@ ResourceLoaderBridge* ResourceLoaderBridge::Create(
const std::string& frame_origin,
const std::string& main_frame_origin,
const std::string& headers,
- const std::string& default_mime_type,
int load_flags,
int requestor_pid,
ResourceType::Type request_type,