summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorukai@chromium.org <ukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-10 06:07:07 +0000
committerukai@chromium.org <ukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-10 06:07:07 +0000
commitcac0669cfdf15ca9fde795f147dd94aa8943c0f4 (patch)
tree5fd7e090b0e934f355c6f9c29ea01f072a3e6f99
parent8a5926073380bc6c962ff2bfb603186cf74d4d14 (diff)
downloadchromium_src-cac0669cfdf15ca9fde795f147dd94aa8943c0f4.zip
chromium_src-cac0669cfdf15ca9fde795f147dd94aa8943c0f4.tar.gz
chromium_src-cac0669cfdf15ca9fde795f147dd94aa8943c0f4.tar.bz2
Add LOAD_VERIFY_EV_CERT in net load loag.
We'd like to run EV cert verification in cert verifier's context, but EV cert verification is expensive and it is only relevant to main frame. So, pass the LOAD_VERIFY_EV_CERT flag when the resource is main frame to request EV cert verification. BUG=10911 TEST=none Review URL: http://codereview.chromium.org/118373 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18036 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/renderer_host/resource_dispatcher_host.cc5
-rw-r--r--net/base/load_flags.h3
2 files changed, 7 insertions, 1 deletions
diff --git a/chrome/browser/renderer_host/resource_dispatcher_host.cc b/chrome/browser/renderer_host/resource_dispatcher_host.cc
index 073528c..c950447 100644
--- a/chrome/browser/renderer_host/resource_dispatcher_host.cc
+++ b/chrome/browser/renderer_host/resource_dispatcher_host.cc
@@ -325,7 +325,10 @@ void ResourceDispatcherHost::BeginRequest(
request->set_first_party_for_cookies(request_data.first_party_for_cookies);
request->set_referrer(request_data.referrer.spec());
request->SetExtraRequestHeaders(request_data.headers);
- request->set_load_flags(request_data.load_flags);
+ int load_flags = request_data.load_flags;
+ if (request_data.resource_type == ResourceType::MAIN_FRAME)
+ load_flags |= net::LOAD_VERIFY_EV_CERT;
+ request->set_load_flags(load_flags);
request->set_context(context);
request->set_origin_pid(request_data.origin_pid);
diff --git a/net/base/load_flags.h b/net/base/load_flags.h
index f60163f35..2c007a6 100644
--- a/net/base/load_flags.h
+++ b/net/base/load_flags.h
@@ -67,6 +67,9 @@ enum {
// Indicate this request is for a download, as opposed to viewing.
LOAD_IS_DOWNLOAD = 1 << 15,
+
+ // Requires EV certificate verification.
+ LOAD_VERIFY_EV_CERT = 1 << 16,
};
} // namespace net