OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 { | 114 { |
115 return String(data, length); | 115 return String(data, length); |
116 } | 116 } |
117 | 117 |
118 bool WebString::equals(const WebString& s) const | 118 bool WebString::equals(const WebString& s) const |
119 { | 119 { |
120 return equal(m_private.get(), s.m_private.get()); | 120 return equal(m_private.get(), s.m_private.get()); |
121 } | 121 } |
122 | 122 |
123 WebString::WebString(const WTF::String& s) | 123 WebString::WebString(const WTF::String& s) |
| 124 : m_private(s.impl()) |
124 { | 125 { |
125 m_private = s.impl(); | |
126 } | 126 } |
127 | 127 |
128 WebString& WebString::operator=(const WTF::String& s) | 128 WebString& WebString::operator=(const WTF::String& s) |
129 { | 129 { |
130 assign(s.impl()); | 130 assign(s.impl()); |
131 return *this; | 131 return *this; |
132 } | 132 } |
133 | 133 |
134 WebString::operator WTF::String() const | 134 WebString::operator WTF::String() const |
135 { | 135 { |
(...skipping 15 matching lines...) Expand all Loading... |
151 { | 151 { |
152 return WTF::AtomicString(m_private.get()); | 152 return WTF::AtomicString(m_private.get()); |
153 } | 153 } |
154 | 154 |
155 void WebString::assign(WTF::StringImpl* p) | 155 void WebString::assign(WTF::StringImpl* p) |
156 { | 156 { |
157 m_private = p; | 157 m_private = p; |
158 } | 158 } |
159 | 159 |
160 } // namespace blink | 160 } // namespace blink |
OLD | NEW |