Index: content/browser/frame_host/frame_tree.cc |
diff --git a/content/browser/frame_host/frame_tree.cc b/content/browser/frame_host/frame_tree.cc |
index 388c878ba3b06a3a6fd0bb69386ca6fdadf7e09d..3e07036458971cadb51ecec0f2a40d3946f97189 100644 |
--- a/content/browser/frame_host/frame_tree.cc |
+++ b/content/browser/frame_host/frame_tree.cc |
@@ -404,23 +404,11 @@ void FrameTree::FrameRemoved(FrameTreeNode* frame) { |
on_frame_removed_.Run(frame->current_frame_host()); |
} |
-void FrameTree::UpdateLoadProgress() { |
- double progress = 0.0; |
- int frame_count = 0; |
- |
- for (FrameTreeNode* node : Nodes()) { |
- // Ignore the current frame if it has not started loading. |
- if (!node->has_started_loading()) |
- continue; |
- |
- // Collect progress. |
- progress += node->loading_progress(); |
- frame_count++; |
- } |
- |
- if (frame_count != 0) |
- progress /= frame_count; |
+void FrameTree::UpdateLoadProgress(FrameTreeNode* frame) { |
+ if (root_ != frame) |
+ return; |
+ double progress = frame->loading_progress(); |
if (progress <= load_progress_) |
return; |
load_progress_ = progress; |