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

Unified Diff: third_party/WebKit/Source/core/fetch/ResourceFetcher.h

Issue 1889973002: Refactoring starting a resource load (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix a browser_test Created 4 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
Index: third_party/WebKit/Source/core/fetch/ResourceFetcher.h
diff --git a/third_party/WebKit/Source/core/fetch/ResourceFetcher.h b/third_party/WebKit/Source/core/fetch/ResourceFetcher.h
index edb42fe580d6c7ec26b726264cdce1f47abe70f7..31a65ed9874196c2940fc58bd707415619de1668 100644
--- a/third_party/WebKit/Source/core/fetch/ResourceFetcher.h
+++ b/third_party/WebKit/Source/core/fetch/ResourceFetcher.h
@@ -80,6 +80,9 @@ public:
using DocumentResourceMap = HeapHashMap<String, WeakMember<Resource>>;
const DocumentResourceMap& allResources() const { return m_documentResources; }
+ // Actually starts loading a Resource if it wasn't started during requestResource().
+ bool startLoad(Resource*);
+
void setAutoLoadImages(bool);
void setImagesEnabled(bool);
@@ -113,7 +116,6 @@ public:
void didReceiveResponse(Resource*, const ResourceResponse&);
void didReceiveData(const Resource*, const char* data, int dataLength, int encodedDataLength);
void didDownloadData(const Resource*, int dataLength, int encodedDataLength);
- void willStartLoadingResource(Resource*, ResourceLoader*, ResourceRequest&);
bool defersLoading() const;
enum AccessControlLoggingDecision {
@@ -131,7 +133,7 @@ public:
ResourceLoadingFromNetwork,
ResourceLoadingFromCache
};
- void requestLoadStarted(Resource*, const FetchRequest&, ResourceLoadStartType, bool isStaticData = false);
+ void requestLoadStarted(unsigned long identifier, Resource*, const FetchRequest&, ResourceLoadStartType, bool isStaticData = false);
static const ResourceLoaderOptions& defaultResourceOptions();
String getCacheIdentifier() const;
@@ -139,8 +141,6 @@ public:
static void determineRequestContext(ResourceRequest&, Resource::Type, bool isMainFrame);
void determineRequestContext(ResourceRequest&, Resource::Type);
- WebTaskRunner* loadingTaskRunner();
-
void updateAllImageResourcePriorities();
void reloadLoFiImages();
@@ -153,7 +153,7 @@ private:
explicit ResourceFetcher(FetchContext*);
- void initializeRevalidation(const FetchRequest&, Resource*);
+ void initializeRevalidation(ResourceRequest&, Resource*);
Resource* createResourceForLoading(FetchRequest&, const String& charset, const ResourceFactory&);
void storeResourceTimingInitiatorInformation(Resource*);
@@ -168,6 +168,7 @@ private:
void removeResourceLoader(ResourceLoader*);
void initializeResourceRequest(ResourceRequest&, Resource::Type, FetchRequest::DeferOption);
+ void willSendRequest(unsigned long identifier, ResourceRequest&, const ResourceResponse&, const ResourceLoaderOptions&);
bool resourceNeedsLoad(Resource*, const FetchRequest&, RevalidationPolicy);
bool shouldDeferImageLoad(const KURL&) const;
« no previous file with comments | « third_party/WebKit/Source/core/fetch/Resource.cpp ('k') | third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698