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

Side by Side Diff: content/child/fileapi/webfilesystem_impl.cc

Issue 165373004: Move WorkerTaskRunner to content/child. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « content/child/fileapi/webfilesystem_impl.h ('k') | content/child/fileapi/webfilewriter_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/child/fileapi/webfilesystem_impl.h" 5 #include "content/child/fileapi/webfilesystem_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop/message_loop_proxy.h" 10 #include "base/message_loop/message_loop_proxy.h"
11 #include "base/strings/utf_string_conversions.h" 11 #include "base/strings/utf_string_conversions.h"
12 #include "base/synchronization/waitable_event.h" 12 #include "base/synchronization/waitable_event.h"
13 #include "base/threading/thread_local.h" 13 #include "base/threading/thread_local.h"
14 #include "content/child/blink_glue.h" 14 #include "content/child/blink_glue.h"
15 #include "content/child/child_thread.h" 15 #include "content/child/child_thread.h"
16 #include "content/child/fileapi/file_system_dispatcher.h" 16 #include "content/child/fileapi/file_system_dispatcher.h"
17 #include "content/child/fileapi/webfilewriter_impl.h" 17 #include "content/child/fileapi/webfilewriter_impl.h"
18 #include "content/child/worker_task_runner.h"
18 #include "content/common/fileapi/file_system_messages.h" 19 #include "content/common/fileapi/file_system_messages.h"
19 #include "third_party/WebKit/public/platform/WebFileInfo.h" 20 #include "third_party/WebKit/public/platform/WebFileInfo.h"
20 #include "third_party/WebKit/public/platform/WebFileSystemCallbacks.h" 21 #include "third_party/WebKit/public/platform/WebFileSystemCallbacks.h"
21 #include "third_party/WebKit/public/platform/WebString.h" 22 #include "third_party/WebKit/public/platform/WebString.h"
22 #include "third_party/WebKit/public/platform/WebURL.h" 23 #include "third_party/WebKit/public/platform/WebURL.h"
23 #include "third_party/WebKit/public/web/WebHeap.h" 24 #include "third_party/WebKit/public/web/WebHeap.h"
24 #include "url/gurl.h" 25 #include "url/gurl.h"
25 #include "webkit/child/worker_task_runner.h"
26 #include "webkit/common/fileapi/directory_entry.h" 26 #include "webkit/common/fileapi/directory_entry.h"
27 #include "webkit/common/fileapi/file_system_util.h" 27 #include "webkit/common/fileapi/file_system_util.h"
28 28
29 using blink::WebFileInfo; 29 using blink::WebFileInfo;
30 using blink::WebFileSystemCallbacks; 30 using blink::WebFileSystemCallbacks;
31 using blink::WebFileSystemEntry; 31 using blink::WebFileSystemEntry;
32 using blink::WebString; 32 using blink::WebString;
33 using blink::WebURL; 33 using blink::WebURL;
34 using blink::WebVector; 34 using blink::WebVector;
35 using webkit_glue::WorkerTaskRunner;
36 35
37 namespace content { 36 namespace content {
38 37
39 namespace { 38 namespace {
40 39
41 base::LazyInstance<base::ThreadLocalPointer<WebFileSystemImpl> >::Leaky 40 base::LazyInstance<base::ThreadLocalPointer<WebFileSystemImpl> >::Leaky
42 g_webfilesystem_tls = LAZY_INSTANCE_INITIALIZER; 41 g_webfilesystem_tls = LAZY_INSTANCE_INITIALIZER;
43 42
44 class WaitableCallbackResults { 43 class WaitableCallbackResults {
45 public: 44 public:
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 int callbacks_id) { 608 int callbacks_id) {
610 DCHECK(CalledOnValidThread()); 609 DCHECK(CalledOnValidThread());
611 CallbacksMap::iterator found = callbacks_.find(callbacks_id); 610 CallbacksMap::iterator found = callbacks_.find(callbacks_id);
612 DCHECK(found != callbacks_.end()); 611 DCHECK(found != callbacks_.end());
613 WebFileSystemCallbacks callbacks = found->second; 612 WebFileSystemCallbacks callbacks = found->second;
614 callbacks_.erase(found); 613 callbacks_.erase(found);
615 return callbacks; 614 return callbacks;
616 } 615 }
617 616
618 } // namespace content 617 } // namespace content
OLDNEW
« no previous file with comments | « content/child/fileapi/webfilesystem_impl.h ('k') | content/child/fileapi/webfilewriter_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698