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

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

Issue 1428383002: Make ResourceFetcher::m_documentResources use WeakPtr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add TODOs Created 5 years 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 992bc497ca0cc6ca90156e083199e1fc66c0a984..5b1eab060e4c1019819d371e719ad612bd63d864 100644
--- a/third_party/WebKit/Source/core/fetch/ResourceFetcher.h
+++ b/third_party/WebKit/Source/core/fetch/ResourceFetcher.h
@@ -78,7 +78,7 @@ public:
Resource* cachedResource(const KURL&) const;
- typedef HashMap<String, ResourcePtr<Resource>> DocumentResourceMap;
+ typedef WillBeHeapHashMap<String, WeakPtrWillBeWeakMember<Resource>> DocumentResourceMap;
const DocumentResourceMap& allResources() const { return m_documentResources; }
bool autoLoadImages() const { return m_autoLoadImages; }
@@ -91,8 +91,6 @@ public:
FetchContext& context() const { return m_context ? *m_context.get() : FetchContext::nullInstance(); }
void clearContext() { m_context.clear(); }
- void garbageCollectDocumentResources();
-
int requestCount() const;
bool isPreloaded(const KURL&) const;
@@ -174,8 +172,6 @@ private:
static bool resourceNeedsLoad(Resource*, const FetchRequest&, RevalidationPolicy);
- void garbageCollectDocumentResourcesTimerFired(Timer<ResourceFetcher>*);
-
void resourceTimingReportTimerFired(Timer<ResourceFetcher>*);
void reloadImagesIfNotDeferred();
@@ -197,7 +193,6 @@ private:
OwnPtrWillBeMember<WillBeHeapListHashSet<RawPtrWillBeMember<Resource>>> m_preloads;
OwnPtrWillBeMember<ArchiveResourceCollection> m_archiveResourceCollection;
- Timer<ResourceFetcher> m_garbageCollectDocumentResourcesTimer;
Timer<ResourceFetcher> m_resourceTimingReportTimer;
// We intentionally use a Member instead of a ResourcePtr.
« 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