Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(75)

Unified Diff: net/base/filter.cc

Issue 11810: Adjust histograms to get better data for latency experiments... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/base/filter.cc
===================================================================
--- net/base/filter.cc (revision 5673)
+++ net/base/filter.cc (working copy)
@@ -92,8 +92,19 @@
return;
}
- if (!is_sdch_response)
+ if (!is_sdch_response) {
+ if (1 < encoding_types->size()) {
+ // Multiple filters were intended to only be used for SDCH (thus far!)
+ SdchManager::SdchErrorRecovery(
+ SdchManager::MULTIENCODING_FOR_NON_SDCH_REQUEST);
+ }
+ if ((1 == encoding_types->size()) &&
+ (FILTER_TYPE_SDCH == encoding_types->front())) {
+ SdchManager::SdchErrorRecovery(
+ SdchManager::SDCH_CONTENT_ENCODE_FOR_NON_SDCH_REQUEST);
+ }
return;
+ }
// If content encoding included SDCH, then everything is fine.
if (!encoding_types->empty() &&
@@ -103,8 +114,11 @@
// payload. To handle this gracefully, we simulate the "probably" deleted
// ",gzip" by appending a tentative gzip decode, which will default to a
// no-op pass through filter if it doesn't get gzip headers where expected.
- if (1 == encoding_types->size())
+ if (1 == encoding_types->size()) {
encoding_types->push_back(FILTER_TYPE_GZIP_HELPING_SDCH);
+ SdchManager::SdchErrorRecovery(
+ SdchManager::OPTIONAL_GUNZIP_ENCODING_ADDED);
+ }
return;
}

Powered by Google App Engine
This is Rietveld 408576698