summaryrefslogtreecommitdiffstats
path: root/net/url_request/url_request_http_job.cc
diff options
context:
space:
mode:
authorjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-15 01:06:53 +0000
committerjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-15 01:06:53 +0000
commitd8fd513cd610568904212fa0d2a0de523d85a2ff (patch)
tree2025a97ba0925f3b3494baaa30e3dfe186b8f199 /net/url_request/url_request_http_job.cc
parent96c77a6d2bf1e573e48748b54c8bf3c7aa4c9d96 (diff)
downloadchromium_src-d8fd513cd610568904212fa0d2a0de523d85a2ff.zip
chromium_src-d8fd513cd610568904212fa0d2a0de523d85a2ff.tar.gz
chromium_src-d8fd513cd610568904212fa0d2a0de523d85a2ff.tar.bz2
Adjust histograms to only collect non-cache stats for SDCH.
I also changed the name of all the SDCH histograms so that there would be no confusion about the data. I also added one new problem code, but that recordation doesn't have any semantic impact. I added it to help make it easier to diagnose dictionary specification errors in SDCH. bug=12012 R=wtc Review URL: http://codereview.chromium.org/115377 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16138 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/url_request/url_request_http_job.cc')
-rw-r--r--net/url_request/url_request_http_job.cc17
1 files changed, 12 insertions, 5 deletions
diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc
index 9c81e00..143b0a8 100644
--- a/net/url_request/url_request_http_job.cc
+++ b/net/url_request/url_request_http_job.cc
@@ -67,15 +67,18 @@ URLRequestHttpJob::URLRequestHttpJob(URLRequest* request)
context_(request->context()),
sdch_dictionary_advertised_(false),
sdch_test_activated_(false),
- sdch_test_control_(false) {
+ sdch_test_control_(false),
+ is_cached_content_(false) {
}
URLRequestHttpJob::~URLRequestHttpJob() {
DCHECK(!sdch_test_control_ || !sdch_test_activated_);
- if (sdch_test_control_)
- RecordPacketStats(SDCH_EXPERIMENT_HOLDBACK);
- if (sdch_test_activated_)
- RecordPacketStats(SDCH_EXPERIMENT_DECODE);
+ if (!IsCachedContent()) {
+ if (sdch_test_control_)
+ RecordPacketStats(SDCH_EXPERIMENT_HOLDBACK);
+ if (sdch_test_activated_)
+ RecordPacketStats(SDCH_EXPERIMENT_DECODE);
+ }
if (sdch_dictionary_url_.is_valid()) {
// Prior to reaching the destructor, request_ has been set to a NULL
@@ -469,6 +472,10 @@ void URLRequestHttpJob::NotifyHeadersComplete() {
response_info_ = transaction_->GetResponseInfo();
+ // Save boolean, as we'll need this info at destruction time, and filters may
+ // also need this info.
+ is_cached_content_ = response_info_->was_cached;
+
// Get the Set-Cookie values, and send them to our cookie database.
if (!(request_info_.load_flags & net::LOAD_DO_NOT_SAVE_COOKIES)) {
URLRequestContext* ctx = request_->context();