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

Unified Diff: net/http/http_cache_transaction.cc

Issue 1039263002: //net changes for stale-while-revalidate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@s-w-r-remove-old-impl
Patch Set: Renumber LOAD_SUPPORT_ASYNC_REVALIDATION. Created 5 years, 7 months 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
« no previous file with comments | « net/base/load_flags_list.h ('k') | net/http/http_response_info.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_cache_transaction.cc
diff --git a/net/http/http_cache_transaction.cc b/net/http/http_cache_transaction.cc
index 84c7f4ff76c0bc79d41ba21dd0a3a70ef0f726bb..eeb6063e66e0eea54fd5440fa0e031bb934c8cf8 100644
--- a/net/http/http_cache_transaction.cc
+++ b/net/http/http_cache_transaction.cc
@@ -2119,6 +2119,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(request_->method == "HEAD" || request_->method == "GET");
hiroshige 2015/06/12 05:58:03 The doc says: "Only the GET method is in scope." a
Adam Rice 2015/06/12 06:41:57 You're right. Fixed.
+ skip_validation = true;
+ response_.async_revalidation_required = true;
+ }
+
if (request_->method == "HEAD" &&
(truncated_ || response_.headers->response_code() == 206)) {
DCHECK(!partial_);
« no previous file with comments | « net/base/load_flags_list.h ('k') | net/http/http_response_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698