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

Unified Diff: content/browser/frame_host/navigation_entry_impl.cc

Issue 253333003: Add a histogram for size of the memory used by redirect chain. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | tools/metrics/histograms/histograms.xml » ('j') | tools/metrics/histograms/histograms.xml » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/navigation_entry_impl.cc
diff --git a/content/browser/frame_host/navigation_entry_impl.cc b/content/browser/frame_host/navigation_entry_impl.cc
index b021d5eda18cea37a92d27924094752c5b77a5b7..d9d13d55634294dc8b98749a08cedf7161a70cf0 100644
--- a/content/browser/frame_host/navigation_entry_impl.cc
+++ b/content/browser/frame_host/navigation_entry_impl.cc
@@ -292,6 +292,12 @@ int NavigationEntryImpl::GetHttpStatusCode() const {
void NavigationEntryImpl::SetRedirectChain(
const std::vector<GURL>& redirect_chain) {
redirect_chain_ = redirect_chain;
+
+ size_t total_size = 0;
+ for (size_t i = 0; i < redirect_chain_.size(); ++i) {
+ total_size += redirect_chain_[i].Bytesize();
+ }
+ UMA_HISTOGRAM_COUNTS("Navigation.RedirectChainSizeInBytes", total_size);
}
const std::vector<GURL>& NavigationEntryImpl::GetRedirectChain() const {
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | tools/metrics/histograms/histograms.xml » ('J')

Powered by Google App Engine
This is Rietveld 408576698