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

Issue 518016: Avoid meta-refresh when back-button gets non-sdch content... (Closed)

Created:
10 years, 12 months ago by jar (doing other things)
Modified:
9 years, 6 months ago
Reviewers:
kmixter1
CC:
chromium-reviews_googlegroups.com, darin (slow to review)
Visibility:
Public.

Description

Avoid meta-refresh when back-button gets non-sdch content The first page search from google will not be SDCH encoded, but will trigger a background download of a dictionary for future use. ..but.. IF the user navigates forward from the search page, and then back, then Chromium will fetch the content from cache after specifying in the URL that a dictionary is now available. This new logic detects such a situation where non-SDCH content is pulled from the cache, and avoids the (slower and overly conservative) meta-refresh. test=see bug for repro cases. Check about:histogram/SDCH for error codes. bug=20457 r=kmixter Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=35318

Patch Set 1 #

Total comments: 6

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -5 lines) Patch
M net/base/sdch_filter.cc View 1 2 chunks +12 lines, -5 lines 0 comments Download
M net/base/sdch_manager.h View 1 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
jar (doing other things)
10 years, 12 months ago (2009-12-24 21:23:39 UTC) #1
kmixter1
LGTM http://codereview.chromium.org/518016/diff/1/2 File net/base/sdch_filter.cc (right): http://codereview.chromium.org/518016/diff/1/2#newcode154 net/base/sdch_filter.cc:154: // This is where we try very hard ...
10 years, 11 months ago (2009-12-28 19:29:02 UTC) #2
kmixter1
LGTM http://codereview.chromium.org/518016/diff/1/2 File net/base/sdch_filter.cc (right): http://codereview.chromium.org/518016/diff/1/2#newcode154 net/base/sdch_filter.cc:154: // This is where we try very hard ...
10 years, 11 months ago (2009-12-28 23:02:36 UTC) #3
jar (doing other things)
10 years, 11 months ago (2009-12-28 23:05:05 UTC) #4
Changes per comments by kmixter.

http://codereview.chromium.org/518016/diff/1/2
File net/base/sdch_filter.cc (right):

http://codereview.chromium.org/518016/diff/1/2#newcode171
net/base/sdch_filter.cc:171: } else if (filter_context().IsCachedContent()
The original request headers are not saved into the cache :-(.  I agree, if we
had the headers, the comparison would be the way to go.  I don't recall all the
reasons, but I recall that there were reasons why the request headers were not
saved (I raised this point with darin and/or ricardo).

On 2009/12/28 19:29:02, kmixter1 wrote:
> Do we still have the original request headers (those that resulted in this
> cached response)?  If so then it seem the ideal solution would be to only add
> the SDCH filter if the original request accepted it.  This seems like the best
> alternative short of that.

http://codereview.chromium.org/518016/diff/1/3
File net/base/sdch_manager.h (right):

http://codereview.chromium.org/518016/diff/1/3#newcode126
net/base/sdch_manager.h:126: PASS_THROUGH_OLD_CACHED = 79,   // Back button got
pre-SDCH cached content.
On 2009/12/28 19:29:02, kmixter1 wrote:
> Maybe worth commenting that unlike most of the problem codes here, this one is
> expected through normal browser use.  As such, I guess this is mostly useful
in
> manual testing that the code is executing and less for field metrics
collection.

Done.

Powered by Google App Engine
This is Rietveld 408576698