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

Unified Diff: third_party/WebKit/Source/core/frame/FrameSerializer.h

Issue 2886943003: [Offline Pages] Adding missing image/CSS detection in FrameSerializer. (Closed)
Patch Set: finally fixed. Created 3 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
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | third_party/WebKit/Source/core/frame/FrameSerializer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/frame/FrameSerializer.h
diff --git a/third_party/WebKit/Source/core/frame/FrameSerializer.h b/third_party/WebKit/Source/core/frame/FrameSerializer.h
index b53d02d984a0f7defee3763e8f5217ef5ff9e5fd..8a7b3664d701ca8e6d801d7f86382badb77de830 100644
--- a/third_party/WebKit/Source/core/frame/FrameSerializer.h
+++ b/third_party/WebKit/Source/core/frame/FrameSerializer.h
@@ -107,6 +107,8 @@ class CORE_EXPORT FrameSerializer final {
virtual Vector<Attribute> GetCustomAttributes(const Element&) {
return Vector<Attribute>();
}
+
+ virtual bool ShouldCollectProblemMetric() { return false; }
};
// Constructs a serializer that will write output to the given deque of
@@ -146,11 +148,19 @@ class CORE_EXPORT FrameSerializer final {
void RetrieveResourcesForCSSValue(const CSSValue&, Document&);
Deque<SerializedResource>* resources_;
+ // This hashset is only used for de-duplicating resources to be serialized.
HashSet<KURL> resource_urls_;
bool is_serializing_css_;
Delegate& delegate_;
+
+ // Variables for problem detection during serialization.
+ int total_image_count_;
+ int loaded_image_count_;
+ int total_css_count_;
+ int loaded_css_count_;
+ bool should_collect_problem_metric_;
};
} // namespace blink
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | third_party/WebKit/Source/core/frame/FrameSerializer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698