Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Side by Side Diff: WebKit/chromium/src/WorkerAsyncFileSystemChromium.cpp

Issue 11192017: ********** WebCore blob hacking (Closed) Base URL: http://svn.webkit.org/repository/webkit/trunk/Source/
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 WorkerContext* m_workerContext; 174 WorkerContext* m_workerContext;
175 }; 175 };
176 176
177 void WorkerAsyncFileSystemChromium::createWriter(AsyncFileWriterClient* client, const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) 177 void WorkerAsyncFileSystemChromium::createWriter(AsyncFileWriterClient* client, const KURL& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
178 { 178 {
179 createWorkerFileSystemCallbacksBridge(WorkerFileWriterHelperCallbacks::creat e(client, path, m_webFileSystem, callbacks, m_workerContext))->postReadMetadataT oMainThread(m_webFileSystem, path, m_modeForCurrentOperation); 179 createWorkerFileSystemCallbacksBridge(WorkerFileWriterHelperCallbacks::creat e(client, path, m_webFileSystem, callbacks, m_workerContext))->postReadMetadataT oMainThread(m_webFileSystem, path, m_modeForCurrentOperation);
180 } 180 }
181 181
182 void WorkerAsyncFileSystemChromium::createSnapshotFileAndReadMetadata(const KURL & path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks) 182 void WorkerAsyncFileSystemChromium::createSnapshotFileAndReadMetadata(const KURL & path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
183 { 183 {
184 KURL internalBlobURL = BlobURL::createInternalURL(); 184 createWorkerFileSystemCallbacksBridge(callbacks)->postCreateSnapshotFileToMa inThread(m_webFileSystem, path, m_modeForCurrentOperation);
185
186 createWorkerFileSystemCallbacksBridge(createSnapshotFileCallback(internalBlo bURL, callbacks))->postCreateSnapshotFileToMainThread(m_webFileSystem, internalB lobURL, path, m_modeForCurrentOperation);
187 } 185 }
188 186
189 PassRefPtr<WorkerFileSystemCallbacksBridge> WorkerAsyncFileSystemChromium::creat eWorkerFileSystemCallbacksBridge(PassOwnPtr<AsyncFileSystemCallbacks> callbacks) 187 PassRefPtr<WorkerFileSystemCallbacksBridge> WorkerAsyncFileSystemChromium::creat eWorkerFileSystemCallbacksBridge(PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
190 { 188 {
191 ASSERT(m_synchronousType == AsynchronousFileSystem || !m_bridgeForCurrentOpe ration); 189 ASSERT(m_synchronousType == AsynchronousFileSystem || !m_bridgeForCurrentOpe ration);
192 (void)m_synchronousType;
193 190
194 m_modeForCurrentOperation = fileSystemOperationsMode; 191 m_modeForCurrentOperation = fileSystemOperationsMode;
195 m_modeForCurrentOperation.append(String::number(m_workerContext->thread()->r unLoop().createUniqueId())); 192 m_modeForCurrentOperation.append(String::number(m_workerContext->thread()->r unLoop().createUniqueId()));
196 193
197 m_bridgeForCurrentOperation = WorkerFileSystemCallbacksBridge::create(m_work er, m_scriptExecutionContext, new WebKit::WebFileSystemCallbacksImpl(callbacks)) ; 194 m_bridgeForCurrentOperation = WorkerFileSystemCallbacksBridge::create(m_work er, m_scriptExecutionContext, new WebKit::WebFileSystemCallbacksImpl(callbacks)) ;
198 return m_bridgeForCurrentOperation; 195 return m_bridgeForCurrentOperation;
199 } 196 }
200 197
201 } // namespace WebCore 198 } // namespace WebCore
202 199
203 #endif // ENABLE(FILE_SYSTEM) 200 #endif // ENABLE(FILE_SYSTEM)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698