| OLD | NEW |
| 1 /* Based on nsURLParsers.cc from Mozilla | 1 /* Based on nsURLParsers.cc from Mozilla |
| 2 * ------------------------------------- | 2 * ------------------------------------- |
| 3 * The contents of this file are subject to the Mozilla Public License Version | 3 * The contents of this file are subject to the Mozilla Public License Version |
| 4 * 1.1 (the "License"); you may not use this file except in compliance with | 4 * 1.1 (the "License"); you may not use this file except in compliance with |
| 5 * the License. You may obtain a copy of the License at | 5 * the License. You may obtain a copy of the License at |
| 6 * http://www.mozilla.org/MPL/ | 6 * http://www.mozilla.org/MPL/ |
| 7 * | 7 * |
| 8 * Software distributed under the License is distributed on an "AS IS" basis, | 8 * Software distributed under the License is distributed on an "AS IS" basis, |
| 9 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License | 9 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License |
| 10 * for the specific language governing rights and limitations under the | 10 * for the specific language governing rights and limitations under the |
| (...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 685 | 685 |
| 686 // Save the new query | 686 // Save the new query |
| 687 *query = MakeRange(cur, end); | 687 *query = MakeRange(cur, end); |
| 688 return true; | 688 return true; |
| 689 } | 689 } |
| 690 | 690 |
| 691 } // namespace | 691 } // namespace |
| 692 | 692 |
| 693 Parsed::Parsed() : whitespace_removed(false), inner_parsed_(NULL) {} | 693 Parsed::Parsed() : whitespace_removed(false), inner_parsed_(NULL) {} |
| 694 | 694 |
| 695 Parsed::Parsed(const Parsed& other) : | 695 Parsed::Parsed(const Parsed& other) |
| 696 scheme(other.scheme), | 696 : scheme(other.scheme), |
| 697 username(other.username), | 697 username(other.username), |
| 698 password(other.password), | 698 password(other.password), |
| 699 host(other.host), | 699 host(other.host), |
| 700 port(other.port), | 700 port(other.port), |
| 701 path(other.path), | 701 path(other.path), |
| 702 query(other.query), | 702 query(other.query), |
| 703 ref(other.ref), | 703 ref(other.ref), |
| 704 inner_parsed_(NULL) { | 704 whitespace_removed(other.whitespace_removed), |
| 705 inner_parsed_(NULL) { |
| 705 if (other.inner_parsed_) | 706 if (other.inner_parsed_) |
| 706 set_inner_parsed(*other.inner_parsed_); | 707 set_inner_parsed(*other.inner_parsed_); |
| 707 } | 708 } |
| 708 | 709 |
| 709 Parsed& Parsed::operator=(const Parsed& other) { | 710 Parsed& Parsed::operator=(const Parsed& other) { |
| 710 if (this != &other) { | 711 if (this != &other) { |
| 711 scheme = other.scheme; | 712 scheme = other.scheme; |
| 712 username = other.username; | 713 username = other.username; |
| 713 password = other.password; | 714 password = other.password; |
| 714 host = other.host; | 715 host = other.host; |
| 715 port = other.port; | 716 port = other.port; |
| 716 path = other.path; | 717 path = other.path; |
| 717 query = other.query; | 718 query = other.query; |
| 718 ref = other.ref; | 719 ref = other.ref; |
| 720 whitespace_removed = other.whitespace_removed; |
| 719 if (other.inner_parsed_) | 721 if (other.inner_parsed_) |
| 720 set_inner_parsed(*other.inner_parsed_); | 722 set_inner_parsed(*other.inner_parsed_); |
| 721 else | 723 else |
| 722 clear_inner_parsed(); | 724 clear_inner_parsed(); |
| 723 } | 725 } |
| 724 return *this; | 726 return *this; |
| 725 } | 727 } |
| 726 | 728 |
| 727 Parsed::~Parsed() { | 729 Parsed::~Parsed() { |
| 728 delete inner_parsed_; | 730 delete inner_parsed_; |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 934 } | 936 } |
| 935 | 937 |
| 936 void ParseAfterScheme(const base::char16* spec, | 938 void ParseAfterScheme(const base::char16* spec, |
| 937 int spec_len, | 939 int spec_len, |
| 938 int after_scheme, | 940 int after_scheme, |
| 939 Parsed* parsed) { | 941 Parsed* parsed) { |
| 940 DoParseAfterScheme(spec, spec_len, after_scheme, parsed); | 942 DoParseAfterScheme(spec, spec_len, after_scheme, parsed); |
| 941 } | 943 } |
| 942 | 944 |
| 943 } // namespace url | 945 } // namespace url |
| OLD | NEW |