diff options
| author | Steve Block <steveblock@google.com> | 2009-12-17 09:55:06 -0800 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2009-12-17 09:55:06 -0800 |
| commit | b880d713c04257ca40abfef97c300afdead423b8 (patch) | |
| tree | 6982576c228bcd1a7efe98afed544d840751094c /WebCore/storage/LocalStorageThread.h | |
| parent | e2e7a5c57b53f01e63a0245b4420d54b454cb373 (diff) | |
| parent | 643ca7872b450ea4efacab6188849e5aac2ba161 (diff) | |
| download | external_webkit-b880d713c04257ca40abfef97c300afdead423b8.zip external_webkit-b880d713c04257ca40abfef97c300afdead423b8.tar.gz external_webkit-b880d713c04257ca40abfef97c300afdead423b8.tar.bz2 | |
am 643ca787: Merge webkit.org at r51976 : Initial merge by git.
Merge commit '643ca7872b450ea4efacab6188849e5aac2ba161' into eclair-mr2-plus-aosp
* commit '643ca7872b450ea4efacab6188849e5aac2ba161':
Merge webkit.org at r51976 : Initial merge by git.
Diffstat (limited to 'WebCore/storage/LocalStorageThread.h')
| -rw-r--r-- | WebCore/storage/LocalStorageThread.h | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/WebCore/storage/LocalStorageThread.h b/WebCore/storage/LocalStorageThread.h index e9e2b58..6f05911 100644 --- a/WebCore/storage/LocalStorageThread.h +++ b/WebCore/storage/LocalStorageThread.h @@ -30,6 +30,7 @@ #include <wtf/HashSet.h> #include <wtf/MessageQueue.h> +#include <wtf/PassOwnPtr.h> #include <wtf/PassRefPtr.h> #include <wtf/Threading.h> @@ -39,34 +40,27 @@ namespace WebCore { class LocalStorageTask; // FIXME: Rename this class to StorageThread - class LocalStorageThread : public ThreadSafeShared<LocalStorageThread> { + class LocalStorageThread : public Noncopyable { public: - static PassRefPtr<LocalStorageThread> create(); + static PassOwnPtr<LocalStorageThread> create(); + ~LocalStorageThread(); bool start(); - - void scheduleImport(StorageAreaSync*); - void scheduleSync(StorageAreaSync*); - - // Called from the main thread to synchronously shut down this thread void terminate(); - // Background thread part of the terminate procedure + void scheduleTask(PassOwnPtr<LocalStorageTask>); + + // Background thread part of the terminate procedure. void performTerminate(); private: LocalStorageThread(); - static void* localStorageThreadStart(void*); - void* localStorageThread(); + // Called on background thread. + static void* threadEntryPointCallback(void*); + void* threadEntryPoint(); - Mutex m_threadCreationMutex; ThreadIdentifier m_threadID; - RefPtr<LocalStorageThread> m_selfRef; - - MessageQueue<RefPtr<LocalStorageTask> > m_queue; - - Mutex m_terminateLock; - ThreadCondition m_terminateCondition; + MessageQueue<LocalStorageTask> m_queue; }; } // namespace WebCore |
