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

Unified Diff: third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.h

Issue 2823843008: Remove unnecessary indirection of ResourceFetcher::preloads_ (Closed)
Patch Set: fix Created 3 years, 8 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 | « no previous file | third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.h
diff --git a/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.h b/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.h
index 1dcd6d738564f25f4500c2c56f525a5d5cb77d34..cb596559973975c6a212b5b022e2883add27f563 100644
--- a/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.h
+++ b/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.h
@@ -104,7 +104,7 @@ class PLATFORM_EXPORT ResourceFetcher
void EnableIsPreloadedForTest();
bool IsPreloadedForTest(const KURL&) const;
- int CountPreloads() const { return preloads_ ? preloads_->size() : 0; }
+ int CountPreloads() const { return preloads_.size(); }
void ClearPreloads(ClearPreloadsPolicy = kClearAllPreloads);
void PreloadStarted(Resource*);
void LogPreloadStats(ClearPreloadsPolicy);
@@ -143,7 +143,7 @@ class PLATFORM_EXPORT ResourceFetcher
ResourceTimingInfo* GetNavigationTimingInfo();
bool ContainsAsPreloadForTesting(Resource* resource) const {
- return preloads_ && preloads_->Contains(resource);
+ return preloads_.Contains(resource);
}
// Workaround for https://crbug.com/666214.
@@ -229,7 +229,7 @@ class PLATFORM_EXPORT ResourceFetcher
HashSet<String> validated_urls_;
mutable DocumentResourceMap document_resources_;
- Member<HeapListHashSet<Member<Resource>>> preloads_;
+ HeapListHashSet<Member<Resource>> preloads_;
Member<MHTMLArchive> archive_;
TaskRunnerTimer<ResourceFetcher> resource_timing_report_timer_;
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698