| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2007, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2007, 2008, 2009 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008, 2009, 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2008, 2009, 2011 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 void KURLGooglePrivate::copyTo(KURLGooglePrivate* dest) const | 277 void KURLGooglePrivate::copyTo(KURLGooglePrivate* dest) const |
| 278 { | 278 { |
| 279 dest->m_isValid = m_isValid; | 279 dest->m_isValid = m_isValid; |
| 280 dest->m_protocolIsInHTTPFamily = m_protocolIsInHTTPFamily; | 280 dest->m_protocolIsInHTTPFamily = m_protocolIsInHTTPFamily; |
| 281 dest->m_parsed = m_parsed; | 281 dest->m_parsed = m_parsed; |
| 282 | 282 |
| 283 // Don't copy the 16-bit string since that will be regenerated as needed. | 283 // Don't copy the 16-bit string since that will be regenerated as needed. |
| 284 dest->m_utf8 = CString(m_utf8.data(), m_utf8.length()); | 284 dest->m_utf8 = CString(m_utf8.data(), m_utf8.length()); |
| 285 dest->m_utf8IsASCII = m_utf8IsASCII; | 285 dest->m_utf8IsASCII = m_utf8IsASCII; |
| 286 dest->m_stringIsValid = false; | 286 dest->m_stringIsValid = false; |
| 287 dest->m_string = String(); // Clear the invalid string to avoid cross thread
ref counting. |
| 287 } | 288 } |
| 288 | 289 |
| 289 String KURLGooglePrivate::componentString(const url_parse::Component& comp) cons
t | 290 String KURLGooglePrivate::componentString(const url_parse::Component& comp) cons
t |
| 290 { | 291 { |
| 291 if (!m_isValid || comp.len <= 0) { | 292 if (!m_isValid || comp.len <= 0) { |
| 292 // KURL returns a null string if the URL is itself a null string, and an | 293 // KURL returns a null string if the URL is itself a null string, and an |
| 293 // empty string for other nonexistent entities. | 294 // empty string for other nonexistent entities. |
| 294 if (utf8String().isNull()) | 295 if (utf8String().isNull()) |
| 295 return String(); | 296 return String(); |
| 296 return String("", 0); | 297 return String("", 0); |
| (...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 959 | 960 |
| 960 if (a.port() != b.port()) | 961 if (a.port() != b.port()) |
| 961 return false; | 962 return false; |
| 962 | 963 |
| 963 return true; | 964 return true; |
| 964 } | 965 } |
| 965 | 966 |
| 966 } // namespace WebCore | 967 } // namespace WebCore |
| 967 | 968 |
| 968 #endif // USE(GOOGLEURL) | 969 #endif // USE(GOOGLEURL) |
| OLD | NEW |