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

Side by Side Diff: third_party/WebKit/Source/modules/webdatabase/DatabaseThread.cpp

Issue 2123183002: Move crossThreadBind() from platform/ to wtf/ Base URL: https://chromium.googlesource.com/chromium/src.git@TRV_WTFCrossThreadCopier
Patch Set: Rebase Created 4 years, 5 months 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) 2007, 2008, 2013 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2013 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 14 matching lines...) Expand all
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */ 27 */
28 28
29 #include "modules/webdatabase/DatabaseThread.h" 29 #include "modules/webdatabase/DatabaseThread.h"
30 30
31 #include "modules/webdatabase/Database.h" 31 #include "modules/webdatabase/Database.h"
32 #include "modules/webdatabase/DatabaseTask.h" 32 #include "modules/webdatabase/DatabaseTask.h"
33 #include "modules/webdatabase/SQLTransactionClient.h" 33 #include "modules/webdatabase/SQLTransactionClient.h"
34 #include "modules/webdatabase/SQLTransactionCoordinator.h" 34 #include "modules/webdatabase/SQLTransactionCoordinator.h"
35 #include "platform/CrossThreadFunctional.h"
36 #include "platform/Logging.h" 35 #include "platform/Logging.h"
37 #include "platform/WebThreadSupportingGC.h" 36 #include "platform/WebThreadSupportingGC.h"
38 #include "public/platform/Platform.h" 37 #include "public/platform/Platform.h"
38 #include "wtf/Functional.h"
39 #include "wtf/PtrUtil.h" 39 #include "wtf/PtrUtil.h"
40 #include <memory> 40 #include <memory>
41 41
42 namespace blink { 42 namespace blink {
43 43
44 DatabaseThread::DatabaseThread() 44 DatabaseThread::DatabaseThread()
45 : m_transactionClient(wrapUnique(new SQLTransactionClient())) 45 : m_transactionClient(wrapUnique(new SQLTransactionClient()))
46 , m_cleanupSync(nullptr) 46 , m_cleanupSync(nullptr)
47 , m_terminationRequested(false) 47 , m_terminationRequested(false)
48 { 48 {
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 { 169 {
170 MutexLocker lock(m_terminationRequestedMutex); 170 MutexLocker lock(m_terminationRequestedMutex);
171 ASSERT(!m_terminationRequested); 171 ASSERT(!m_terminationRequested);
172 } 172 }
173 #endif 173 #endif
174 // WebThread takes ownership of the task. 174 // WebThread takes ownership of the task.
175 m_thread->postTask(BLINK_FROM_HERE, crossThreadBind(&DatabaseTask::run, std: :move(task))); 175 m_thread->postTask(BLINK_FROM_HERE, crossThreadBind(&DatabaseTask::run, std: :move(task)));
176 } 176 }
177 177
178 } // namespace blink 178 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698