OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2008, 2009, 2011 Google Inc. All rights reserved. | 2 * Copyright (c) 2008, 2009, 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 // Getters for the data. | 94 // Getters for the data. |
95 const CString& utf8String() const { return m_utf8; } | 95 const CString& utf8String() const { return m_utf8; } |
96 const String& string() const; | 96 const String& string() const; |
97 | 97 |
98 bool m_isValid; | 98 bool m_isValid; |
99 bool m_protocolIsInHTTPFamily; | 99 bool m_protocolIsInHTTPFamily; |
100 url_parse::Parsed m_parsed; // Indexes into the UTF-8 version of the str
ing. | 100 url_parse::Parsed m_parsed; // Indexes into the UTF-8 version of the str
ing. |
101 | 101 |
102 KURL* innerURL() const { return m_innerURL.get(); } | 102 KURL* innerURL() const { return m_innerURL.get(); } |
103 | 103 |
104 void reportMemoryUsage(MemoryObjectInfo*) const; | |
105 bool isSafeToSendToAnotherThread() const; | 104 bool isSafeToSendToAnotherThread() const; |
106 | 105 |
107 private: | 106 private: |
108 void initInnerURL(); | 107 void initInnerURL(); |
109 void initProtocolIsInHTTPFamily(); | 108 void initProtocolIsInHTTPFamily(); |
110 | 109 |
111 CString m_utf8; | 110 CString m_utf8; |
112 | 111 |
113 // Set to true when the caller set us using the ASCII setter. We can | 112 // Set to true when the caller set us using the ASCII setter. We can |
114 // be more efficient when we know there is no UTF-8 to worry about. | 113 // be more efficient when we know there is no UTF-8 to worry about. |
115 // This flag is currently always correct, but should be changed to be a | 114 // This flag is currently always correct, but should be changed to be a |
116 // hint (see setUtf8). | 115 // hint (see setUtf8). |
117 bool m_utf8IsASCII; | 116 bool m_utf8IsASCII; |
118 | 117 |
119 mutable bool m_stringIsValid; | 118 mutable bool m_stringIsValid; |
120 mutable String m_string; | 119 mutable String m_string; |
121 | 120 |
122 OwnPtr<KURL> m_innerURL; | 121 OwnPtr<KURL> m_innerURL; |
123 }; | 122 }; |
124 | 123 |
125 } // namespace WebCore | 124 } // namespace WebCore |
126 | 125 |
127 #endif | 126 #endif |
OLD | NEW |