summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authormpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-21 23:29:15 +0000
committermpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-21 23:29:15 +0000
commit5e212edaf84b2695da04a8d6d7cb701e85ca9e2e (patch)
tree8648e2d89057cda56dda35293d76da1c8de45008 /content
parent8f57812b0d7cfc918708444efceb39d8caccbbff (diff)
downloadchromium_src-5e212edaf84b2695da04a8d6d7cb701e85ca9e2e.zip
chromium_src-5e212edaf84b2695da04a8d6d7cb701e85ca9e2e.tar.gz
chromium_src-5e212edaf84b2695da04a8d6d7cb701e85ca9e2e.tar.bz2
Fix bug where we'd allow chrome-extension URLs to be loaded in incognito mode
as subresources, even though the extension is not allowed in incognito. BUG=118721 TEST=see bug for repro; try the proof of concept in incognito mode with adblock installed but not allowed in incognito. adblock should not be detected. Review URL: http://codereview.chromium.org/9726025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128097 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/browser/renderer_host/resource_request_info_impl.cc5
-rw-r--r--content/public/browser/resource_request_info.h1
2 files changed, 4 insertions, 2 deletions
diff --git a/content/browser/renderer_host/resource_request_info_impl.cc b/content/browser/renderer_host/resource_request_info_impl.cc
index 77d5011..a192cbd 100644
--- a/content/browser/renderer_host/resource_request_info_impl.cc
+++ b/content/browser/renderer_host/resource_request_info_impl.cc
@@ -26,6 +26,7 @@ const ResourceRequestInfo* ResourceRequestInfo::ForRequest(
// static
void ResourceRequestInfo::AllocateForTesting(
net::URLRequest* request,
+ ResourceType::Type resource_type,
ResourceContext* context) {
ResourceRequestInfoImpl* info =
new ResourceRequestInfoImpl(
@@ -35,11 +36,11 @@ void ResourceRequestInfo::AllocateForTesting(
MSG_ROUTING_NONE, // route_id
0, // origin_pid
0, // request_id
- true, // is_main_frame
+ resource_type == ResourceType::MAIN_FRAME, // is_main_frame
0, // frame_id
false, // parent_is_main_frame
0, // parent_frame_id
- ResourceType::MAIN_FRAME, // resource_type
+ resource_type, // resource_type
PAGE_TRANSITION_LINK, // transition_type
0, // upload_size
false, // is_download
diff --git a/content/public/browser/resource_request_info.h b/content/public/browser/resource_request_info.h
index 33c6899..f556e48 100644
--- a/content/public/browser/resource_request_info.h
+++ b/content/public/browser/resource_request_info.h
@@ -31,6 +31,7 @@ class ResourceRequestInfo {
// NOTE: Add more parameters if you need to initialize other fields.
CONTENT_EXPORT static void AllocateForTesting(
net::URLRequest* request,
+ ResourceType::Type resource_type,
ResourceContext* context);
// Returns the associated RenderView for a given process. Returns false, if