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 #ifndef URL_URL_CANON_H_ | 5 #ifndef URL_URL_CANON_H_ |
6 #define URL_URL_CANON_H_ | 6 #define URL_URL_CANON_H_ |
7 | 7 |
8 #include <stdlib.h> | 8 #include <stdlib.h> |
9 #include <string.h> | 9 #include <string.h> |
10 | 10 |
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
727 | 727 |
728 // Getters for the itnernal data. See the variables below for how the | 728 // Getters for the itnernal data. See the variables below for how the |
729 // information is encoded. | 729 // information is encoded. |
730 const URLComponentSource<CHAR>& sources() const { return sources_; } | 730 const URLComponentSource<CHAR>& sources() const { return sources_; } |
731 const Parsed& components() const { return components_; } | 731 const Parsed& components() const { return components_; } |
732 | 732 |
733 private: | 733 private: |
734 // Returns a pointer to a static empty string that is used as a placeholder | 734 // Returns a pointer to a static empty string that is used as a placeholder |
735 // to indicate a component should be deleted (see below). | 735 // to indicate a component should be deleted (see below). |
736 const CHAR* Placeholder() { | 736 const CHAR* Placeholder() { |
737 static const CHAR empty_cstr = 0; | 737 static const CHAR empty_string = 0; |
738 return &empty_cstr; | 738 return &empty_string; |
739 } | 739 } |
740 | 740 |
741 // We support three states: | 741 // We support three states: |
742 // | 742 // |
743 // Action | Source Component | 743 // Action | Source Component |
744 // -----------------------+-------------------------------------------------- | 744 // -----------------------+-------------------------------------------------- |
745 // Don't change component | NULL (unused) | 745 // Don't change component | NULL (unused) |
746 // Replace component | (replacement string) (replacement component) | 746 // Replace component | (replacement string) (replacement component) |
747 // Delete component | (non-NULL) (invalid component: (0,-1)) | 747 // Delete component | (non-NULL) (invalid component: (0,-1)) |
748 // | 748 // |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
883 bool base_is_file, | 883 bool base_is_file, |
884 const base::char16* relative_url, | 884 const base::char16* relative_url, |
885 const Component& relative_component, | 885 const Component& relative_component, |
886 CharsetConverter* query_converter, | 886 CharsetConverter* query_converter, |
887 CanonOutput* output, | 887 CanonOutput* output, |
888 Parsed* out_parsed); | 888 Parsed* out_parsed); |
889 | 889 |
890 } // namespace url | 890 } // namespace url |
891 | 891 |
892 #endif // URL_URL_CANON_H_ | 892 #endif // URL_URL_CANON_H_ |
OLD | NEW |