Chromium Code Reviews| Index: net/http/http_cache_transaction.cc |
| diff --git a/net/http/http_cache_transaction.cc b/net/http/http_cache_transaction.cc |
| index d5cb94d7909b233e49bbad53cf70e3806372dccc..64dacb86052fcc35384ada5955248503a711bfd1 100644 |
| --- a/net/http/http_cache_transaction.cc |
| +++ b/net/http/http_cache_transaction.cc |
| @@ -2115,6 +2115,13 @@ int HttpCache::Transaction::BeginCacheValidation() { |
| bool skip_validation = (required_validation == VALIDATION_NONE); |
| + if ((effective_load_flags_ & LOAD_SUPPORT_ASYNC_REVALIDATION) && |
| + required_validation == VALIDATION_ASYNCHRONOUS) { |
| + DCHECK_EQ("GET", request_->method); |
|
rvargas (doing something else)
2015/08/20 22:26:29
nit: dchecks should read as an if, not as an EXPEC
Adam Rice
2015/08/21 15:01:46
I didn't realise that, thank you.
|
| + skip_validation = true; |
| + response_.async_revalidation_required = true; |
| + } |
| + |
| if (request_->method == "HEAD" && |
| (truncated_ || response_.headers->response_code() == 206)) { |
| DCHECK(!partial_); |
| @@ -2242,7 +2249,7 @@ int HttpCache::Transaction::BeginExternallyConditionalizedRequest() { |
| EXTERNALLY_CONDITIONALIZED_CACHE_USABLE; |
| if (mode_ == NONE) |
| type = EXTERNALLY_CONDITIONALIZED_MISMATCHED_VALIDATORS; |
| - else if (RequiresValidation()) |
| + else if (RequiresValidation() != VALIDATION_NONE) |
| type = EXTERNALLY_CONDITIONALIZED_CACHE_REQUIRES_VALIDATION; |
| // TODO(ricea): Add CACHE_USABLE_STALE once stale-while-revalidate CL landed. |