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

Unified Diff: content/browser/loader/resource_dispatcher_host_impl.h

Issue 1041993004: content::ResourceDispatcherHostImpl changes for stale-while-revalidate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@s-w-r-yhirano-patch
Patch Set: Functional change: An initial redirect leg is now async revalidated. s-w-r is still ignored after t… Created 5 years, 1 month 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
Index: content/browser/loader/resource_dispatcher_host_impl.h
diff --git a/content/browser/loader/resource_dispatcher_host_impl.h b/content/browser/loader/resource_dispatcher_host_impl.h
index d575c104d1082a13752697b2da10d2856f2c7069..129837467430877bfab9fa6820eca8fa697323a0 100644
--- a/content/browser/loader/resource_dispatcher_host_impl.h
+++ b/content/browser/loader/resource_dispatcher_host_impl.h
@@ -25,6 +25,7 @@
#include "base/time/time.h"
#include "base/timer/timer.h"
#include "content/browser/download/download_resource_handler.h"
+#include "content/browser/loader/async_revalidation_manager.h"
davidben 2015/11/23 23:40:43 Forward-decl
Adam Rice 2015/11/25 19:39:40 Done.
#include "content/browser/loader/global_routing_id.h"
#include "content/browser/loader/resource_loader.h"
#include "content/browser/loader/resource_loader_delegate.h"
@@ -280,6 +281,10 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl
NavigationURLLoaderImplCore* loader,
ServiceWorkerNavigationHandleCore* service_worker_handle_core);
+ // Turns on stale-while-revalidate support, regardless of command-line flags
+ // or experiment status. For unit tests only.
+ void EnableStaleWhileRevalidateForTesting();
+
private:
friend class ResourceDispatcherHostTest;
@@ -588,6 +593,10 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl
bool allow_cross_origin_auth_prompt_;
+ // AsyncRevalidationManager is non-NULL if and only if
+ // stale-while-revalidate is enabled.
+ scoped_ptr<AsyncRevalidationManager> async_revalidation_manager_;
+
// http://crbug.com/90971 - Assists in tracking down use-after-frees on
// shutdown.
std::set<const ResourceContext*> active_resource_contexts_;

Powered by Google App Engine
This is Rietveld 408576698