| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |