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

Side by Side Diff: webkit/fileapi/file_writer_delegate.cc

Issue 7583053: Add MessageLoopProxy::current (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: No need for MessageLoopProxy destruction observer. Created 9 years, 4 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "webkit/fileapi/file_writer_delegate.h" 5 #include "webkit/fileapi/file_writer_delegate.h"
6 6
7 #include "base/file_util_proxy.h" 7 #include "base/file_util_proxy.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/threading/thread_restrictions.h" 9 #include "base/threading/thread_restrictions.h"
10 #include "net/base/net_errors.h" 10 #include "net/base/net_errors.h"
(...skipping 14 matching lines...) Expand all
25 const base::PlatformFileInfo& /* file_info */ 25 const base::PlatformFileInfo& /* file_info */
26 >::Type InitializeTaskCallback; 26 >::Type InitializeTaskCallback;
27 27
28 class InitializeTask : public base::RefCountedThreadSafe<InitializeTask> { 28 class InitializeTask : public base::RefCountedThreadSafe<InitializeTask> {
29 public: 29 public:
30 InitializeTask( 30 InitializeTask(
31 base::PlatformFile file, 31 base::PlatformFile file,
32 FileSystemOperationContext* context, 32 FileSystemOperationContext* context,
33 InitializeTaskCallback* callback) 33 InitializeTaskCallback* callback)
34 : origin_message_loop_proxy_( 34 : origin_message_loop_proxy_(
35 base::MessageLoopProxy::CreateForCurrentThread()), 35 base::MessageLoopProxy::current()),
36 error_code_(base::PLATFORM_FILE_OK), 36 error_code_(base::PLATFORM_FILE_OK),
37 file_(file), 37 file_(file),
38 context_(*context), 38 context_(*context),
39 callback_(callback) { 39 callback_(callback) {
40 DCHECK(callback); 40 DCHECK(callback);
41 } 41 }
42 42
43 bool Start(scoped_refptr<base::MessageLoopProxy> message_loop_proxy, 43 bool Start(scoped_refptr<base::MessageLoopProxy> message_loop_proxy,
44 const tracked_objects::Location& from_here) { 44 const tracked_objects::Location& from_here) {
45 return message_loop_proxy->PostTask(from_here, NewRunnableMethod(this, 45 return message_loop_proxy->PostTask(from_here, NewRunnableMethod(this,
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 320
321 FileSystemQuotaUtil* FileWriterDelegate::quota_util() const { 321 FileSystemQuotaUtil* FileWriterDelegate::quota_util() const {
322 DCHECK(file_system_operation_); 322 DCHECK(file_system_operation_);
323 DCHECK(file_system_operation_->file_system_context()); 323 DCHECK(file_system_operation_->file_system_context());
324 DCHECK(file_system_operation_->file_system_operation_context()); 324 DCHECK(file_system_operation_->file_system_operation_context());
325 return file_system_operation_->file_system_context()->GetQuotaUtil( 325 return file_system_operation_->file_system_context()->GetQuotaUtil(
326 file_system_operation_context()->src_type()); 326 file_system_operation_context()->src_type());
327 } 327 }
328 328
329 } // namespace fileapi 329 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/fileapi/file_system_url_request_job_unittest.cc ('k') | webkit/fileapi/file_writer_delegate_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698