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

Unified Diff: net/base/sdch_filter.cc

Issue 11009: Open up SDCH for all sites, in preparation for latency tests... (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/sdch_filter.cc
===================================================================
--- net/base/sdch_filter.cc (revision 5301)
+++ net/base/sdch_filter.cc (working copy)
@@ -42,7 +42,7 @@
base::TimeDelta duration = time_of_last_read_ - connect_time();
// Note: connect_time may be somewhat incorrect if this is cached data, as
// it will reflect the time the connect was done for the original read :-(.
- // To avoid any chances of overflow (and since SDCH is meant to primarilly
+ // To avoid any chances of overflow, and since SDCH is meant to primarilly
// handle short downloads, we'll restrict what results we log to effectively
// discard bogus large numbers. Note that IF the number is large enough, it
// would DCHECK in histogram as the square of the value is summed. The
@@ -50,9 +50,9 @@
// seconds, so the discarded data would not be that readable anyway.
if (30 >= duration.InSeconds()) {
if (DECODING_IN_PROGRESS == decoding_status_)
- UMA_HISTOGRAM_TIMES(L"Sdch.Transit_Latency", duration);
+ UMA_HISTOGRAM_TIMES(L"Sdch.Transit_Latency_2", duration);
if (PASS_THROUGH == decoding_status_)
- UMA_HISTOGRAM_TIMES(L"Sdch.Transit_Pass-through_Latency", duration);
+ UMA_HISTOGRAM_TIMES(L"Sdch.Transit_Pass-through_Latency_2", duration);
}
}
@@ -90,7 +90,9 @@
if (!dest_buffer || available_space <= 0)
return FILTER_ERROR;
- time_of_last_read_ = base::Time::Now();
+ // Don't update when we're called to just flush out our internal buffers.
+ if (next_stream_data_ && stream_data_len_ > 0)
+ time_of_last_read_ = base::Time::Now();
if (WAITING_FOR_DICTIONARY_SELECTION == decoding_status_) {
FilterStatus status = InitializeDictionary();

Powered by Google App Engine
This is Rietveld 408576698