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

Unified Diff: url/gurl.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
Index: url/gurl.cc
diff --git a/url/gurl.cc b/url/gurl.cc
index c79cdba1aa21902651a6868579a4be7e0f326753..93d14c3da8ce8abdd047c0a9a538028a8fb4dda0 100644
--- a/url/gurl.cc
+++ b/url/gurl.cc
@@ -526,6 +526,11 @@ void GURL::Swap(GURL* other) {
inner_url_.swap(other->inner_url_);
}
+size_t GURL::Bytesize() const {
+ return sizeof(*this) + spec_.size() +
+ (inner_url_ ? inner_url_->Bytesize() : 0);
+}
+
std::ostream& operator<<(std::ostream& out, const GURL& url) {
return out << url.possibly_invalid_spec();
}
« tools/metrics/histograms/histograms.xml ('K') | « url/gurl.h ('k') | url/gurl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698