| 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 16 matching lines...) Expand all Loading... |
| 27 */ | 27 */ |
| 28 | 28 |
| 29 #include "platform/weborigin/DatabaseIdentifier.h" | 29 #include "platform/weborigin/DatabaseIdentifier.h" |
| 30 | 30 |
| 31 #include "platform/weborigin/KURL.h" | 31 #include "platform/weborigin/KURL.h" |
| 32 #include "platform/weborigin/KnownPorts.h" | 32 #include "platform/weborigin/KnownPorts.h" |
| 33 #include "platform/weborigin/SchemeRegistry.h" | 33 #include "platform/weborigin/SchemeRegistry.h" |
| 34 #include "platform/weborigin/SecurityOriginCache.h" | 34 #include "platform/weborigin/SecurityOriginCache.h" |
| 35 #include "platform/weborigin/SecurityPolicy.h" | 35 #include "platform/weborigin/SecurityPolicy.h" |
| 36 #include "wtf/HexNumber.h" | 36 #include "wtf/HexNumber.h" |
| 37 #include "wtf/MainThread.h" | |
| 38 #include "wtf/StdLibExtras.h" | 37 #include "wtf/StdLibExtras.h" |
| 39 #include "wtf/text/StringBuilder.h" | 38 #include "wtf/text/StringBuilder.h" |
| 40 | 39 |
| 41 namespace blink { | 40 namespace blink { |
| 42 | 41 |
| 43 namespace { | 42 namespace { |
| 44 | 43 |
| 45 String escapeIPv6Hostname(const String& hostname) | 44 String escapeIPv6Hostname(const String& hostname) |
| 46 { | 45 { |
| 47 // Shortest IPv6 hostname would be "[::1]". | 46 // Shortest IPv6 hostname would be "[::1]". |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 return SecurityOrigin::create(url); | 125 return SecurityOrigin::create(url); |
| 127 } | 126 } |
| 128 | 127 |
| 129 String createDatabaseIdentifierFromSecurityOrigin(const SecurityOrigin* security
Origin) | 128 String createDatabaseIdentifierFromSecurityOrigin(const SecurityOrigin* security
Origin) |
| 130 { | 129 { |
| 131 String separatorString(&separatorCharacter, 1); | 130 String separatorString(&separatorCharacter, 1); |
| 132 return securityOrigin->protocol() + separatorString + escapeIPv6Hostname(sec
urityOrigin->host()) + separatorString + String::number(securityOrigin->port()); | 131 return securityOrigin->protocol() + separatorString + escapeIPv6Hostname(sec
urityOrigin->host()) + separatorString + String::number(securityOrigin->port()); |
| 133 } | 132 } |
| 134 | 133 |
| 135 } // namespace blink | 134 } // namespace blink |
| OLD | NEW |