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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifdef WIN32 5 #ifdef WIN32
6 #include <windows.h> 6 #include <windows.h>
7 #else 7 #else
8 #include <pthread.h> 8 #include <pthread.h>
9 #endif 9 #endif
10 10
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 return true; 519 return true;
520 } 520 }
521 521
522 void GURL::Swap(GURL* other) { 522 void GURL::Swap(GURL* other) {
523 spec_.swap(other->spec_); 523 spec_.swap(other->spec_);
524 std::swap(is_valid_, other->is_valid_); 524 std::swap(is_valid_, other->is_valid_);
525 std::swap(parsed_, other->parsed_); 525 std::swap(parsed_, other->parsed_);
526 inner_url_.swap(other->inner_url_); 526 inner_url_.swap(other->inner_url_);
527 } 527 }
528 528
529 size_t GURL::Bytesize() const {
530 return sizeof(*this) + spec_.size() +
531 (inner_url_ ? inner_url_->Bytesize() : 0);
532 }
533
529 std::ostream& operator<<(std::ostream& out, const GURL& url) { 534 std::ostream& operator<<(std::ostream& out, const GURL& url) {
530 return out << url.possibly_invalid_spec(); 535 return out << url.possibly_invalid_spec();
531 } 536 }
OLDNEW
« 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