OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 return fileSystem; | 60 return fileSystem; |
61 } | 61 } |
62 | 62 |
63 DOMFileSystem* DOMFileSystem::createIsolatedFileSystem(ExecutionContext* context
, const String& filesystemId) | 63 DOMFileSystem* DOMFileSystem::createIsolatedFileSystem(ExecutionContext* context
, const String& filesystemId) |
64 { | 64 { |
65 if (filesystemId.isEmpty()) | 65 if (filesystemId.isEmpty()) |
66 return 0; | 66 return 0; |
67 | 67 |
68 StringBuilder filesystemName; | 68 StringBuilder filesystemName; |
69 filesystemName.append(Platform::current()->fileSystemCreateOriginIdentifier(
WebSecurityOrigin(context->getSecurityOrigin()))); | 69 filesystemName.append(Platform::current()->fileSystemCreateOriginIdentifier(
WebSecurityOrigin(context->getSecurityOrigin()))); |
70 filesystemName.appendLiteral(":Isolated_"); | 70 filesystemName.append(":Isolated_"); |
71 filesystemName.append(filesystemId); | 71 filesystemName.append(filesystemId); |
72 | 72 |
73 // The rootURL created here is going to be attached to each filesystem reque
st and | 73 // The rootURL created here is going to be attached to each filesystem reque
st and |
74 // is to be validated each time the request is being handled. | 74 // is to be validated each time the request is being handled. |
75 StringBuilder rootURL; | 75 StringBuilder rootURL; |
76 rootURL.appendLiteral("filesystem:"); | 76 rootURL.append("filesystem:"); |
77 rootURL.append(context->getSecurityOrigin()->toString()); | 77 rootURL.append(context->getSecurityOrigin()->toString()); |
78 rootURL.append('/'); | 78 rootURL.append('/'); |
79 rootURL.append(isolatedPathPrefix); | 79 rootURL.append(isolatedPathPrefix); |
80 rootURL.append('/'); | 80 rootURL.append('/'); |
81 rootURL.append(filesystemId); | 81 rootURL.append(filesystemId); |
82 rootURL.append('/'); | 82 rootURL.append('/'); |
83 | 83 |
84 return DOMFileSystem::create(context, filesystemName.toString(), FileSystemT
ypeIsolated, KURL(ParsedURLString, rootURL.toString())); | 84 return DOMFileSystem::create(context, filesystemName.toString(), FileSystemT
ypeIsolated, KURL(ParsedURLString, rootURL.toString())); |
85 } | 85 } |
86 | 86 |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 } | 176 } |
177 | 177 |
178 DEFINE_TRACE(DOMFileSystem) | 178 DEFINE_TRACE(DOMFileSystem) |
179 { | 179 { |
180 DOMFileSystemBase::trace(visitor); | 180 DOMFileSystemBase::trace(visitor); |
181 ActiveDOMObject::trace(visitor); | 181 ActiveDOMObject::trace(visitor); |
182 visitor->trace(m_rootEntry); | 182 visitor->trace(m_rootEntry); |
183 } | 183 } |
184 | 184 |
185 } // namespace blink | 185 } // namespace blink |
OLD | NEW |