| 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 21 matching lines...) Expand all Loading... |
| 32 #include "platform/weborigin/KURL.h" | 32 #include "platform/weborigin/KURL.h" |
| 33 #include "platform/weborigin/KnownPorts.h" | 33 #include "platform/weborigin/KnownPorts.h" |
| 34 #include "platform/weborigin/SchemeRegistry.h" | 34 #include "platform/weborigin/SchemeRegistry.h" |
| 35 #include "platform/weborigin/SecurityOriginCache.h" | 35 #include "platform/weborigin/SecurityOriginCache.h" |
| 36 #include "platform/weborigin/SecurityPolicy.h" | 36 #include "platform/weborigin/SecurityPolicy.h" |
| 37 #include "wtf/HexNumber.h" | 37 #include "wtf/HexNumber.h" |
| 38 #include "wtf/MainThread.h" | 38 #include "wtf/MainThread.h" |
| 39 #include "wtf/StdLibExtras.h" | 39 #include "wtf/StdLibExtras.h" |
| 40 #include "wtf/text/StringBuilder.h" | 40 #include "wtf/text/StringBuilder.h" |
| 41 | 41 |
| 42 namespace WebCore { | 42 namespace blink { |
| 43 | 43 |
| 44 const int maxAllowedPort = 65535; | 44 const int maxAllowedPort = 65535; |
| 45 | 45 |
| 46 static const char separatorCharacter = '_'; | 46 static const char separatorCharacter = '_'; |
| 47 | 47 |
| 48 PassRefPtr<SecurityOrigin> createSecurityOriginFromDatabaseIdentifier(const Stri
ng& databaseIdentifier) | 48 PassRefPtr<SecurityOrigin> createSecurityOriginFromDatabaseIdentifier(const Stri
ng& databaseIdentifier) |
| 49 { | 49 { |
| 50 if (!databaseIdentifier.containsOnlyASCII()) | 50 if (!databaseIdentifier.containsOnlyASCII()) |
| 51 return SecurityOrigin::createUnique(); | 51 return SecurityOrigin::createUnique(); |
| 52 | 52 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 // Now that we've fixed that bug, we still need to produce this string | 95 // Now that we've fixed that bug, we still need to produce this string |
| 96 // to avoid breaking existing persistent state. | 96 // to avoid breaking existing persistent state. |
| 97 if (securityOrigin->needsDatabaseIdentifierQuirkForFiles()) | 97 if (securityOrigin->needsDatabaseIdentifierQuirkForFiles()) |
| 98 return "file__0"; | 98 return "file__0"; |
| 99 | 99 |
| 100 String separatorString(&separatorCharacter, 1); | 100 String separatorString(&separatorCharacter, 1); |
| 101 | 101 |
| 102 return securityOrigin->protocol() + separatorString + securityOrigin->host()
+ separatorString + String::number(securityOrigin->port()); | 102 return securityOrigin->protocol() + separatorString + securityOrigin->host()
+ separatorString + String::number(securityOrigin->port()); |
| 103 } | 103 } |
| 104 | 104 |
| 105 } // namespace WebCore | 105 } // namespace blink |
| OLD | NEW |