| 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 | 148 |
| 149 WebString WebString::fromASCII(const std::string& s) { | 149 WebString WebString::fromASCII(const std::string& s) { |
| 150 DCHECK(base::IsStringASCII(s)); | 150 DCHECK(base::IsStringASCII(s)); |
| 151 return fromLatin1(s); | 151 return fromLatin1(s); |
| 152 } | 152 } |
| 153 | 153 |
| 154 bool WebString::equals(const WebString& s) const { | 154 bool WebString::equals(const WebString& s) const { |
| 155 return equal(m_private.get(), s.m_private.get()); | 155 return equal(m_private.get(), s.m_private.get()); |
| 156 } | 156 } |
| 157 | 157 |
| 158 bool WebString::equals(const char* characters) const { | 158 bool WebString::equals(const char* characters, size_t length) const { |
| 159 return equal(m_private.get(), reinterpret_cast<const LChar*>(characters)); | 159 return equal(m_private.get(), characters, length); |
| 160 } | 160 } |
| 161 | 161 |
| 162 WebString::WebString(const WTF::String& s) : m_private(s.impl()) {} | 162 WebString::WebString(const WTF::String& s) : m_private(s.impl()) {} |
| 163 | 163 |
| 164 WebString& WebString::operator=(const WTF::String& s) { | 164 WebString& WebString::operator=(const WTF::String& s) { |
| 165 assign(s.impl()); | 165 assign(s.impl()); |
| 166 return *this; | 166 return *this; |
| 167 } | 167 } |
| 168 | 168 |
| 169 WebString::operator WTF::String() const { | 169 WebString::operator WTF::String() const { |
| (...skipping 15 matching lines...) Expand all Loading... |
| 185 | 185 |
| 186 WebString::operator WTF::AtomicString() const { | 186 WebString::operator WTF::AtomicString() const { |
| 187 return WTF::AtomicString(m_private.get()); | 187 return WTF::AtomicString(m_private.get()); |
| 188 } | 188 } |
| 189 | 189 |
| 190 void WebString::assign(WTF::StringImpl* p) { | 190 void WebString::assign(WTF::StringImpl* p) { |
| 191 m_private = p; | 191 m_private = p; |
| 192 } | 192 } |
| 193 | 193 |
| 194 } // namespace blink | 194 } // namespace blink |
| OLD | NEW |