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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 | 89 |
90 private: | 90 private: |
91 CreateFileResult() : m_failed(false), m_code(0) {} | 91 CreateFileResult() : m_failed(false), m_code(0) {} |
92 }; | 92 }; |
93 | 93 |
94 static std::unique_ptr<AsyncFileSystemCallbacks> create( | 94 static std::unique_ptr<AsyncFileSystemCallbacks> create( |
95 CreateFileResult* result, | 95 CreateFileResult* result, |
96 const String& name, | 96 const String& name, |
97 const KURL& url, | 97 const KURL& url, |
98 FileSystemType type) { | 98 FileSystemType type) { |
99 return wrapUnique(static_cast<AsyncFileSystemCallbacks*>( | 99 return WTF::wrapUnique(static_cast<AsyncFileSystemCallbacks*>( |
100 new CreateFileHelper(result, name, url, type))); | 100 new CreateFileHelper(result, name, url, type))); |
101 } | 101 } |
102 | 102 |
103 void didFail(int code) override { | 103 void didFail(int code) override { |
104 m_result->m_failed = true; | 104 m_result->m_failed = true; |
105 m_result->m_code = code; | 105 m_result->m_code = code; |
106 } | 106 } |
107 | 107 |
108 ~CreateFileHelper() override {} | 108 ~CreateFileHelper() override {} |
109 | 109 |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 } | 211 } |
212 return fileWriter; | 212 return fileWriter; |
213 } | 213 } |
214 | 214 |
215 DEFINE_TRACE(DOMFileSystemSync) { | 215 DEFINE_TRACE(DOMFileSystemSync) { |
216 DOMFileSystemBase::trace(visitor); | 216 DOMFileSystemBase::trace(visitor); |
217 visitor->trace(m_rootEntry); | 217 visitor->trace(m_rootEntry); |
218 } | 218 } |
219 | 219 |
220 } // namespace blink | 220 } // namespace blink |
OLD | NEW |