| 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 4951416730339897670b865961385f478e516c08..2def36031fa8cffe077c609bea46dd80c0cb2e8c 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_driver.h"
|
| #include "content/browser/loader/global_routing_id.h"
|
| #include "content/browser/loader/resource_loader.h"
|
| #include "content/browser/loader/resource_loader_delegate.h"
|
| @@ -51,10 +52,12 @@ class FilePath;
|
| }
|
|
|
| namespace net {
|
| +class URLRequestContext;
|
| class URLRequestJobFactory;
|
| }
|
|
|
| namespace storage {
|
| +class BlobStorageContext;
|
| class ShareableFileReference;
|
| }
|
|
|
| @@ -304,9 +307,28 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl
|
| uint64 upload_size;
|
| };
|
|
|
| + // Request parameters that are not included in ResourceHostMsg_Request. Used
|
| + // as an argument to ConstructRequest();
|
| + struct ExtraRequestParams {
|
| + ExtraRequestParams();
|
| +
|
| + storage::BlobStorageContext* blob_context;
|
| + int child_id;
|
| + bool is_sync_load;
|
| + bool use_embedded_identity;
|
| + bool support_async_revalidation;
|
| + const net::HttpRequestHeaders* extra_headers;
|
| + };
|
| +
|
| // Map from ProcessID+RouteID pair to the "most interesting" LoadState.
|
| typedef std::map<GlobalRoutingID, LoadInfo> LoadInfoMap;
|
|
|
| + // Map from ResourceContext, HttpCache and url key to AsyncRevalidationDriver
|
| + // object.
|
| + typedef std::map<AsyncRevalidationKey,
|
| + AsyncRevalidationDriver*,
|
| + AsyncRevalidationKey::LessThan> AsyncRevalidationMap;
|
| +
|
| // ResourceLoaderDelegate implementation:
|
| ResourceDispatcherHostLoginDelegate* CreateLoginDelegate(
|
| ResourceLoader* loader,
|
| @@ -435,6 +457,11 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl
|
| IPC::Message* sync_result, // only valid for sync
|
| int route_id); // only valid for async
|
|
|
| + scoped_ptr<net::URLRequest> ConstructRequest(
|
| + net::URLRequestContext* request_context,
|
| + const ResourceHostMsg_Request& request_data,
|
| + const ExtraRequestParams& extra_params);
|
| +
|
| // Creates a ResourceHandler to be used by BeginRequest() for normal resource
|
| // loading.
|
| scoped_ptr<ResourceHandler> CreateResourceHandler(
|
| @@ -507,6 +534,11 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl
|
| int child_id,
|
| bool is_sync_load);
|
|
|
| + void BeginAsyncRevalidation(net::URLRequest* for_request);
|
| + void OnAsyncRevalidationComplete(const AsyncRevalidationKey& key);
|
| + void CancelAsyncRevalidationsForResourceContext(
|
| + ResourceContext* resource_context);
|
| +
|
| LoaderMap pending_loaders_;
|
|
|
| // Collection of temp files downloaded for child processes via
|
| @@ -585,6 +617,14 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl
|
|
|
| bool allow_cross_origin_auth_prompt_;
|
|
|
| + // stale-while-revalidate is enabled either via experiment or command-line
|
| + // flag.
|
| + bool async_revalidation_enabled_;
|
| +
|
| + // Async revalidations that are currently in-flight: either waiting to be
|
| + // scheduled or active on the network.
|
| + AsyncRevalidationMap in_progress_async_revalidations_;
|
| +
|
| // http://crbug.com/90971 - Assists in tracking down use-after-frees on
|
| // shutdown.
|
| std::set<const ResourceContext*> active_resource_contexts_;
|
|
|