Index: content/browser/frame_host/navigation_controller_impl.cc |
diff --git a/content/browser/frame_host/navigation_controller_impl.cc b/content/browser/frame_host/navigation_controller_impl.cc |
index 4fa5f0883f6b4e12bb3403cfdfdabe0ea4d04846..1c608f095837a9563877ca251cc25a6f2ace820b 100644 |
--- a/content/browser/frame_host/navigation_controller_impl.cc |
+++ b/content/browser/frame_host/navigation_controller_impl.cc |
@@ -7,6 +7,7 @@ |
#include "base/bind.h" |
#include "base/debug/trace_event.h" |
#include "base/logging.h" |
+#include "base/metrics/histogram.h" |
#include "base/strings/string_number_conversions.h" // Temporary |
#include "base/strings/string_util.h" |
#include "base/strings/utf_string_conversions.h" |
@@ -824,6 +825,14 @@ bool NavigationControllerImpl::RendererDidNavigate( |
active_entry->SetPageState(params.page_state); |
active_entry->SetRedirectChain(params.redirects); |
+ // Use histogram to track memory impact of redirect chain because it's now |
+ // not cleared for committed entries. |
+ size_t redirect_chain_size = 0; |
+ for (size_t i = 0; i < params.redirects.size(); ++i) { |
+ redirect_chain_size += params.redirects[i].spec().length(); |
+ } |
+ UMA_HISTOGRAM_COUNTS("Navigation.RedirectChainSize", redirect_chain_size); |
+ |
// Once it is committed, we no longer need to track several pieces of state on |
// the entry. |
active_entry->ResetForCommit(); |