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

Unified Diff: net/http/http_cache.h

Issue 1041763002: Remove stale-while-revalidate experimental implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years, 6 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_cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_cache.h
diff --git a/net/http/http_cache.h b/net/http/http_cache.h
index c73004994dee62e9de1968eea128fa2ff3c7f5de..8300c29048c50d5039550d5b757b5220981d67a2 100644
--- a/net/http/http_cache.h
+++ b/net/http/http_cache.h
@@ -15,7 +15,6 @@
#define NET_HTTP_HTTP_CACHE_H_
#include <list>
-#include <map>
#include <set>
#include <string>
@@ -211,16 +210,6 @@ class NET_EXPORT HttpCache : public HttpTransactionFactory,
fail_conditionalization_for_test_ = true;
}
- bool use_stale_while_revalidate() const {
- return use_stale_while_revalidate_;
- }
-
- // Enable stale_while_revalidate functionality for testing purposes.
- void set_use_stale_while_revalidate_for_testing(
- bool use_stale_while_revalidate) {
- use_stale_while_revalidate_ = use_stale_while_revalidate;
- }
-
// HttpTransactionFactory implementation:
int CreateTransaction(RequestPriority priority,
scoped_ptr<HttpTransaction>* trans) override;
@@ -257,11 +246,9 @@ class NET_EXPORT HttpCache : public HttpTransactionFactory,
friend class Transaction;
friend class ViewCacheHelper;
struct PendingOp; // Info for an entry under construction.
- class AsyncValidation; // Encapsulates a single async revalidation.
typedef std::list<Transaction*> TransactionList;
typedef std::list<WorkItem*> WorkItemList;
- typedef std::map<std::string, AsyncValidation*> AsyncValidationMap;
struct ActiveEntry {
explicit ActiveEntry(disk_cache::Entry* entry);
@@ -396,15 +383,6 @@ class NET_EXPORT HttpCache : public HttpTransactionFactory,
// Resumes processing the pending list of |entry|.
void ProcessPendingQueue(ActiveEntry* entry);
- // Called by Transaction to perform an asynchronous revalidation. Creates a
- // new independent transaction as a copy of the original.
- void PerformAsyncValidation(const HttpRequestInfo& original_request,
- const BoundNetLog& net_log);
-
- // Remove the AsyncValidation with url |url| from the |async_validations_| set
- // and delete it.
- void DeleteAsyncValidation(const std::string& url);
-
// Events (called via PostTask) ---------------------------------------------
void OnProcessPendingQueue(ActiveEntry* entry);
@@ -437,10 +415,6 @@ class NET_EXPORT HttpCache : public HttpTransactionFactory,
bool bypass_lock_for_test_;
bool fail_conditionalization_for_test_;
- // true if the implementation of Cache-Control: stale-while-revalidate
- // directive is enabled (either via command-line flag or experiment).
- bool use_stale_while_revalidate_;
-
Mode mode_;
scoped_ptr<QuicServerInfoFactoryAdaptor> quic_server_info_factory_;
@@ -462,9 +436,6 @@ class NET_EXPORT HttpCache : public HttpTransactionFactory,
scoped_ptr<PlaybackCacheMap> playback_cache_map_;
- // The async validations currently in progress, keyed by URL.
- AsyncValidationMap async_validations_;
-
// A clock that can be swapped out for testing.
scoped_ptr<base::Clock> clock_;
« no previous file with comments | « net/base/load_flags_list.h ('k') | net/http/http_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698