| Index: content/browser/renderer_host/buffered_resource_handler.cc
|
| diff --git a/content/browser/renderer_host/buffered_resource_handler.cc b/content/browser/renderer_host/buffered_resource_handler.cc
|
| index 7cd8aed4a90271e50166c6b57746095949fdeb66..107b63d256eb475c8aa171bb2196d5c9c987f3fe 100644
|
| --- a/content/browser/renderer_host/buffered_resource_handler.cc
|
| +++ b/content/browser/renderer_host/buffered_resource_handler.cc
|
| @@ -161,7 +161,8 @@ bool BufferedResourceHandler::DelayResponse() {
|
| const bool sniffing_blocked =
|
| LowerCaseEqualsASCII(content_type_options, "nosniff");
|
| const bool not_modified_status =
|
| - response_->headers && response_->headers->response_code() == 304;
|
| + (response_->data.headers &&
|
| + response_->data.headers->response_code() == 304);
|
| const bool we_would_like_to_sniff = not_modified_status ?
|
| false : net::ShouldSniffMimeType(request_->url(), mime_type);
|
|
|
| @@ -181,7 +182,7 @@ bool BufferedResourceHandler::DelayResponse() {
|
| // mime type. What's a browser to do? Turns out, we're supposed to treat
|
| // the response as "text/plain". This is the most secure option.
|
| mime_type.assign("text/plain");
|
| - response_->mime_type.assign(mime_type);
|
| + response_->data.mime_type.assign(mime_type);
|
| }
|
|
|
| if (!not_modified_status && ShouldWaitForPlugins()) {
|
| @@ -228,7 +229,7 @@ bool BufferedResourceHandler::KeepBuffering(int bytes_read) {
|
| }
|
| }
|
| sniff_content_ = false;
|
| - response_->mime_type.assign(new_type);
|
| + response_->data.mime_type.assign(new_type);
|
|
|
| // We just sniffed the mime type, maybe there is a doctype to process.
|
| if (ShouldWaitForPlugins())
|
| @@ -256,8 +257,8 @@ bool BufferedResourceHandler::CompleteResponseStarted(int request_id) {
|
| // are doing it for an X.509 client certificates.
|
| // TODO(darin): This does not belong here!
|
|
|
| - if (response_->headers && // Can be NULL if FTP.
|
| - response_->headers->response_code() / 100 != 2) {
|
| + if (response_->data.headers && // Can be NULL if FTP.
|
| + response_->data.headers->response_code() / 100 != 2) {
|
| // The response code indicates that this is an error page, but we are
|
| // expecting an X.509 user certificate. We follow Firefox here and show
|
| // our own error page instead of handling the error page as a
|
| @@ -280,8 +281,8 @@ bool BufferedResourceHandler::CompleteResponseStarted(int request_id) {
|
| // download thread.
|
| // TODO(paulg): Only download if the context from the renderer allows it.
|
| if (info->allow_download() && ShouldDownload(NULL)) {
|
| - if (response_->headers && // Can be NULL if FTP.
|
| - response_->headers->response_code() / 100 != 2) {
|
| + if (response_->data.headers && // Can be NULL if FTP.
|
| + response_->data.headers->response_code() / 100 != 2) {
|
| // The response code indicates that this is an error page, but we don't
|
| // know how to display the content. We follow Firefox here and show our
|
| // own error page instead of triggering a download.
|
| @@ -335,7 +336,7 @@ bool BufferedResourceHandler::ShouldWaitForPlugins() {
|
| bool BufferedResourceHandler::ShouldDownload(bool* need_plugin_list) {
|
| if (need_plugin_list)
|
| *need_plugin_list = false;
|
| - std::string type = StringToLowerASCII(response_->mime_type);
|
| + std::string type = StringToLowerASCII(response_->data.mime_type);
|
|
|
| // First, examine Content-Disposition.
|
| std::string disposition;
|
|
|