| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 if (isEmpty()) | 214 if (isEmpty()) |
| 215 return "null"; | 215 return "null"; |
| 216 | 216 |
| 217 if (m_noAccess) | 217 if (m_noAccess) |
| 218 return "null"; | 218 return "null"; |
| 219 | 219 |
| 220 if (m_protocol == "file") | 220 if (m_protocol == "file") |
| 221 return String("file://"); | 221 return String("file://"); |
| 222 | 222 |
| 223 Vector<UChar> result; | 223 Vector<UChar> result; |
| 224 result.reserveCapacity(m_protocol.length() + m_host.length() + 10); | 224 result.reserveInitialCapacity(m_protocol.length() + m_host.length() + 10); |
| 225 append(result, m_protocol); | 225 append(result, m_protocol); |
| 226 append(result, "://"); | 226 append(result, "://"); |
| 227 append(result, m_host); | 227 append(result, m_host); |
| 228 | 228 |
| 229 if (m_port) { | 229 if (m_port) { |
| 230 append(result, ":"); | 230 append(result, ":"); |
| 231 append(result, String::number(m_port)); | 231 append(result, String::number(m_port)); |
| 232 } | 232 } |
| 233 | 233 |
| 234 return String::adopt(result); | 234 return String::adopt(result); |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 return false; | 301 return false; |
| 302 | 302 |
| 303 if (m_port != other->m_port) | 303 if (m_port != other->m_port) |
| 304 return false; | 304 return false; |
| 305 | 305 |
| 306 return true; | 306 return true; |
| 307 } | 307 } |
| 308 | 308 |
| 309 } // namespace WebCore | 309 } // namespace WebCore |
| 310 | 310 |
| OLD | NEW |