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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 const String& filesystemId) { | 66 const String& filesystemId) { |
67 if (filesystemId.isEmpty()) | 67 if (filesystemId.isEmpty()) |
68 return 0; | 68 return 0; |
69 | 69 |
70 StringBuilder filesystemName; | 70 StringBuilder filesystemName; |
71 filesystemName.append(Platform::current()->fileSystemCreateOriginIdentifier( | 71 filesystemName.append(Platform::current()->fileSystemCreateOriginIdentifier( |
72 WebSecurityOrigin(context->getSecurityOrigin()))); | 72 WebSecurityOrigin(context->getSecurityOrigin()))); |
73 filesystemName.append(":Isolated_"); | 73 filesystemName.append(":Isolated_"); |
74 filesystemName.append(filesystemId); | 74 filesystemName.append(filesystemId); |
75 | 75 |
76 // The rootURL created here is going to be attached to each filesystem request
and | 76 // The rootURL created here is going to be attached to each filesystem request |
77 // is to be validated each time the request is being handled. | 77 // and is to be validated each time the request is being handled. |
78 StringBuilder rootURL; | 78 StringBuilder rootURL; |
79 rootURL.append("filesystem:"); | 79 rootURL.append("filesystem:"); |
80 rootURL.append(context->getSecurityOrigin()->toString()); | 80 rootURL.append(context->getSecurityOrigin()->toString()); |
81 rootURL.append('/'); | 81 rootURL.append('/'); |
82 rootURL.append(isolatedPathPrefix); | 82 rootURL.append(isolatedPathPrefix); |
83 rootURL.append('/'); | 83 rootURL.append('/'); |
84 rootURL.append(filesystemId); | 84 rootURL.append(filesystemId); |
85 rootURL.append('/'); | 85 rootURL.append('/'); |
86 | 86 |
87 return DOMFileSystem::create(context, filesystemName.toString(), | 87 return DOMFileSystem::create(context, filesystemName.toString(), |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 successCallback, errorCallback, m_context)); | 192 successCallback, errorCallback, m_context)); |
193 } | 193 } |
194 | 194 |
195 DEFINE_TRACE(DOMFileSystem) { | 195 DEFINE_TRACE(DOMFileSystem) { |
196 DOMFileSystemBase::trace(visitor); | 196 DOMFileSystemBase::trace(visitor); |
197 ActiveDOMObject::trace(visitor); | 197 ActiveDOMObject::trace(visitor); |
198 visitor->trace(m_rootEntry); | 198 visitor->trace(m_rootEntry); |
199 } | 199 } |
200 | 200 |
201 } // namespace blink | 201 } // namespace blink |
OLD | NEW |