| Index: net/http/http_cache_transaction.cc
|
| diff --git a/net/http/http_cache_transaction.cc b/net/http/http_cache_transaction.cc
|
| index 2b96817e56ccb6ecfc17e161b52067e6c9bd13ee..84c7f4ff76c0bc79d41ba21dd0a3a70ef0f726bb 100644
|
| --- a/net/http/http_cache_transaction.cc
|
| +++ b/net/http/http_cache_transaction.cc
|
| @@ -17,7 +17,6 @@
|
| #include "base/compiler_specific.h"
|
| #include "base/format_macros.h"
|
| #include "base/memory/ref_counted.h"
|
| -#include "base/memory/scoped_ptr.h"
|
| #include "base/metrics/field_trial.h"
|
| #include "base/metrics/histogram.h"
|
| #include "base/metrics/sparse_histogram.h"
|
| @@ -182,18 +181,6 @@ void RecordNoStoreHeaderHistogram(int load_flags,
|
| }
|
| }
|
|
|
| -scoped_ptr<base::Value> NetLogAsyncRevalidationInfoCallback(
|
| - const NetLog::Source& source,
|
| - const HttpRequestInfo* request,
|
| - NetLogCaptureMode capture_mode) {
|
| - scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
|
| - source.AddToEventParameters(dict.get());
|
| -
|
| - dict->SetString("url", request->url.possibly_invalid_spec());
|
| - dict->SetString("method", request->method);
|
| - return dict.Pass();
|
| -}
|
| -
|
| enum ExternallyConditionalizedType {
|
| EXTERNALLY_CONDITIONALIZED_CACHE_REQUIRES_VALIDATION,
|
| EXTERNALLY_CONDITIONALIZED_CACHE_USABLE,
|
| @@ -2132,13 +2119,6 @@ int HttpCache::Transaction::BeginCacheValidation() {
|
|
|
| bool skip_validation = (required_validation == VALIDATION_NONE);
|
|
|
| - if (required_validation == VALIDATION_ASYNCHRONOUS &&
|
| - !(request_->method == "GET" && (truncated_ || partial_)) && cache_ &&
|
| - cache_->use_stale_while_revalidate()) {
|
| - TriggerAsyncValidation();
|
| - skip_validation = true;
|
| - }
|
| -
|
| if (request_->method == "HEAD" &&
|
| (truncated_ || response_.headers->response_code() == 206)) {
|
| DCHECK(!partial_);
|
| @@ -2167,7 +2147,6 @@ int HttpCache::Transaction::BeginCacheValidation() {
|
| }
|
|
|
| if (skip_validation) {
|
| - // TODO(ricea): Is this pattern okay for asynchronous revalidations?
|
| UpdateTransactionPattern(PATTERN_ENTRY_USED);
|
| return SetupEntryForRead();
|
| } else {
|
| @@ -2347,7 +2326,7 @@ ValidationType HttpCache::Transaction::RequiresValidation() {
|
| return VALIDATION_NONE;
|
| }
|
|
|
| - if (effective_load_flags_ & (LOAD_VALIDATE_CACHE | LOAD_ASYNC_REVALIDATION))
|
| + if (effective_load_flags_ & LOAD_VALIDATE_CACHE)
|
| return VALIDATION_SYNCHRONOUS;
|
|
|
| if (request_->method == "PUT" || request_->method == "DELETE")
|
| @@ -2601,25 +2580,6 @@ void HttpCache::Transaction::FixHeadersForHead() {
|
| }
|
| }
|
|
|
| -void HttpCache::Transaction::TriggerAsyncValidation() {
|
| - DCHECK(!request_->upload_data_stream);
|
| - BoundNetLog async_revalidation_net_log(
|
| - BoundNetLog::Make(net_log_.net_log(), NetLog::SOURCE_ASYNC_REVALIDATION));
|
| - net_log_.AddEvent(
|
| - NetLog::TYPE_HTTP_CACHE_VALIDATE_RESOURCE_ASYNC,
|
| - async_revalidation_net_log.source().ToEventParametersCallback());
|
| - async_revalidation_net_log.BeginEvent(
|
| - NetLog::TYPE_ASYNC_REVALIDATION,
|
| - base::Bind(
|
| - &NetLogAsyncRevalidationInfoCallback, net_log_.source(), request_));
|
| - base::MessageLoop::current()->PostTask(
|
| - FROM_HERE,
|
| - base::Bind(&HttpCache::PerformAsyncValidation,
|
| - cache_, // cache_ is a weak pointer.
|
| - *request_,
|
| - async_revalidation_net_log));
|
| -}
|
| -
|
| void HttpCache::Transaction::FailRangeRequest() {
|
| response_ = *new_response_;
|
| partial_->FixResponseHeaders(response_.headers.get(), false);
|
|
|