OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "base/file_util_proxy.h" | 5 #include "base/file_util_proxy.h" |
6 | 6 |
7 #include "base/message_loop_proxy.h" | 7 #include "base/message_loop_proxy.h" |
8 | 8 |
9 // TODO(jianli): Move the code from anonymous namespace to base namespace so | 9 // TODO(jianli): Move the code from anonymous namespace to base namespace so |
10 // that all of the base:: prefixes would be unnecessary. | 10 // that all of the base:: prefixes would be unnecessary. |
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 } | 416 } |
417 | 417 |
418 virtual void RunCallback() { | 418 virtual void RunCallback() { |
419 callback_->Run(error_code(), file_info_); | 419 callback_->Run(error_code(), file_info_); |
420 delete callback_; | 420 delete callback_; |
421 } | 421 } |
422 | 422 |
423 private: | 423 private: |
424 base::FileUtilProxy::GetFileInfoCallback* callback_; | 424 base::FileUtilProxy::GetFileInfoCallback* callback_; |
425 FilePath file_path_; | 425 FilePath file_path_; |
426 file_util::FileInfo file_info_; | 426 base::PlatformFileInfo file_info_; |
427 }; | 427 }; |
428 | 428 |
429 bool Start(const tracked_objects::Location& from_here, | 429 bool Start(const tracked_objects::Location& from_here, |
430 scoped_refptr<base::MessageLoopProxy> message_loop_proxy, | 430 scoped_refptr<base::MessageLoopProxy> message_loop_proxy, |
431 scoped_refptr<MessageLoopRelay> relay) { | 431 scoped_refptr<MessageLoopRelay> relay) { |
432 return relay->Start(message_loop_proxy, from_here); | 432 return relay->Start(message_loop_proxy, from_here); |
433 } | 433 } |
434 | 434 |
435 } // namespace | 435 } // namespace |
436 | 436 |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
519 // static | 519 // static |
520 bool FileUtilProxy::RecursiveDelete( | 520 bool FileUtilProxy::RecursiveDelete( |
521 scoped_refptr<MessageLoopProxy> message_loop_proxy, | 521 scoped_refptr<MessageLoopProxy> message_loop_proxy, |
522 const FilePath& file_path, | 522 const FilePath& file_path, |
523 StatusCallback* callback) { | 523 StatusCallback* callback) { |
524 return Start(FROM_HERE, message_loop_proxy, | 524 return Start(FROM_HERE, message_loop_proxy, |
525 new RelayDelete(file_path, true, callback)); | 525 new RelayDelete(file_path, true, callback)); |
526 } | 526 } |
527 | 527 |
528 } // namespace base | 528 } // namespace base |
OLD | NEW |