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

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

Issue 2332333003: Make internals.isPreloaded() to remain the same before/after clearPreloads() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: const auto& Created 4 years, 3 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 847ce9e077d904310327c9ab0cf57a979bcff074..52a02be8f15623feede02887e52c5cd9037e0f6c 100644
--- a/third_party/WebKit/Source/core/fetch/ResourceFetcher.h
+++ b/third_party/WebKit/Source/core/fetch/ResourceFetcher.h
@@ -94,7 +94,9 @@ public:
enum ClearPreloadsPolicy { ClearAllPreloads, ClearSpeculativeMarkupPreloads };
- bool isPreloaded(const KURL&) const;
+ void enableIsPreloadedForTest();
+ bool isPreloadedForTest(const KURL&) const;
+
int countPreloads() const { return m_preloads ? m_preloads->size() : 0; }
void clearPreloads(ClearPreloadsPolicy = ClearAllPreloads);
void preloadStarted(Resource*);
@@ -208,6 +210,8 @@ private:
};
DeadResourceStatsRecorder m_deadStatsRecorder;
+ std::unique_ptr<HashSet<String>> m_preloadedURLsForTest;
+
// 28 bits left
bool m_autoLoadImages : 1;
bool m_imagesEnabled : 1;

Powered by Google App Engine
This is Rietveld 408576698