Skip to content

Commit

Permalink
skip memory estimator
Browse files Browse the repository at this point in the history
  • Loading branch information
malloxpb committed Jul 13, 2018
1 parent e9b6f1c commit d40e72d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions gurl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// #include "base/logging.h"
#include "base/strings/string_piece.h"
#include "base/strings/string_util.h"
#include "base/trace_event/memory_usage_estimator.h"
// #include "base/trace_event/memory_usage_estimator.h"
#include "url/url_canon_stdstring.h"
#include "url/url_util.h"

Expand Down Expand Up @@ -464,11 +464,11 @@ void GURL::Swap(GURL* other) {
inner_url_.swap(other->inner_url_);
}

size_t GURL::EstimateMemoryUsage() const {
return base::trace_event::EstimateMemoryUsage(spec_) +
base::trace_event::EstimateMemoryUsage(inner_url_) +
(parsed_.inner_parsed() ? sizeof(url::Parsed) : 0);
}
// size_t GURL::EstimateMemoryUsage() const {
// return base::trace_event::EstimateMemoryUsage(spec_) +
// base::trace_event::EstimateMemoryUsage(inner_url_) +
// (parsed_.inner_parsed() ? sizeof(url::Parsed) : 0);
// }

std::ostream& operator<<(std::ostream& out, const GURL& url) {
return out << url.possibly_invalid_spec();
Expand Down
2 changes: 1 addition & 1 deletion gurl.h
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ class URL_EXPORT GURL {

// Estimates dynamic memory usage.
// See base/trace_event/memory_usage_estimator.h for more info.
size_t EstimateMemoryUsage() const;
// size_t EstimateMemoryUsage() const;

private:
// Variant of the string parsing constructor that allows the caller to elect
Expand Down

0 comments on commit d40e72d

Please sign in to comment.