summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorstoyan@chromium.org <stoyan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-01 16:33:37 +0000
committerstoyan@chromium.org <stoyan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-01 16:33:37 +0000
commit606334078cffc3385560da493c7882a3e849bc86 (patch)
tree2fe64dd1f55bab598e73f16135b5f8e1671138c0 /chrome
parent1bf71ed8bf7b58f63101049a85e1d881802aa500 (diff)
downloadchromium_src-606334078cffc3385560da493c7882a3e849bc86.zip
chromium_src-606334078cffc3385560da493c7882a3e849bc86.tar.gz
chromium_src-606334078cffc3385560da493c7882a3e849bc86.tar.bz2
Do not write non-toplevel POST response into the WINInet cache.
BUG=55918 Review URL: http://codereview.chromium.org/3595004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61184 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/automation/url_request_automation_job.cc11
-rw-r--r--chrome/test/automation/automation_messages.h7
2 files changed, 16 insertions, 2 deletions
diff --git a/chrome/browser/automation/url_request_automation_job.cc b/chrome/browser/automation/url_request_automation_job.cc
index 8e96e7a..e29aa70 100644
--- a/chrome/browser/automation/url_request_automation_job.cc
+++ b/chrome/browser/automation/url_request_automation_job.cc
@@ -418,13 +418,22 @@ void URLRequestAutomationJob::StartAsync() {
referrer = GURL();
}
+ // Get the resource type (main_frame/script/image/stylesheet etc.
+ ResourceDispatcherHostRequestInfo* request_info =
+ ResourceDispatcherHost::InfoForRequest(request_);
+ ResourceType::Type resource_type = ResourceType::MAIN_FRAME;
+ if (request_info) {
+ resource_type = request_info->resource_type();
+ }
+
// Ask automation to start this request.
IPC::AutomationURLRequest automation_request = {
request_->url().spec(),
request_->method(),
referrer.spec(),
new_request_headers.ToString(),
- request_->get_upload()
+ request_->get_upload(),
+ resource_type
};
DCHECK(message_filter_);
diff --git a/chrome/test/automation/automation_messages.h b/chrome/test/automation/automation_messages.h
index 7f30828..ad6791c 100644
--- a/chrome/test/automation/automation_messages.h
+++ b/chrome/test/automation/automation_messages.h
@@ -301,6 +301,7 @@ struct AutomationURLRequest {
std::string referrer;
std::string extra_request_headers;
scoped_refptr<net::UploadData> upload_data;
+ int resource_type; // see webkit/glue/resource_type.h
};
// Traits for AutomationURLRequest structure to pack/unpack.
@@ -313,13 +314,15 @@ struct ParamTraits<AutomationURLRequest> {
WriteParam(m, p.referrer);
WriteParam(m, p.extra_request_headers);
WriteParam(m, p.upload_data);
+ WriteParam(m, p.resource_type);
}
static bool Read(const Message* m, void** iter, param_type* p) {
return ReadParam(m, iter, &p->url) &&
ReadParam(m, iter, &p->method) &&
ReadParam(m, iter, &p->referrer) &&
ReadParam(m, iter, &p->extra_request_headers) &&
- ReadParam(m, iter, &p->upload_data);
+ ReadParam(m, iter, &p->upload_data) &&
+ ReadParam(m, iter, &p->resource_type);
}
static void Log(const param_type& p, std::string* l) {
l->append("(");
@@ -332,6 +335,8 @@ struct ParamTraits<AutomationURLRequest> {
LogParam(p.extra_request_headers, l);
l->append(", ");
LogParam(p.upload_data, l);
+ l->append(", ");
+ LogParam(p.resource_type, l);
l->append(")");
}
};