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 <stdbool.h> |
| 6 #include <string.h> |
| 7 #include <string> |
| 8 #include <vector> |
| 9 |
| 10 #include "base/basictypes.h" |
| 11 #include "base/file_path.h" |
| 12 #include "base/file_util.h" |
5 #include "base/file_util_proxy.h" | 13 #include "base/file_util_proxy.h" |
6 | 14 #include "base/logging.h" |
7 #include "base/message_loop_proxy.h" | 15 #include "base/message_loop_proxy.h" |
| 16 #include "base/platform_file.h" |
| 17 #include "base/ref_counted.h" |
| 18 #include "base/scoped_ptr.h" |
| 19 #include "base/task.h" |
| 20 #include "base/time.h" |
| 21 #include "base/tracked.h" |
8 | 22 |
9 // TODO(jianli): Move the code from anonymous namespace to base namespace so | 23 // TODO(jianli): Move the code from anonymous namespace to base namespace so |
10 // that all of the base:: prefixes would be unnecessary. | 24 // that all of the base:: prefixes would be unnecessary. |
11 namespace { | 25 namespace { |
12 | 26 |
13 namespace { | 27 namespace { |
14 | 28 |
15 // Performs common checks for move and copy. | 29 // Performs common checks for move and copy. |
16 // This also removes the destination directory if it's non-empty and all other | 30 // This also removes the destination directory if it's non-empty and all other |
17 // checks are passed (so that the copy/move correctly overwrites the | 31 // checks are passed (so that the copy/move correctly overwrites the |
(...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
907 | 921 |
908 // static | 922 // static |
909 bool FileUtilProxy::Flush( | 923 bool FileUtilProxy::Flush( |
910 scoped_refptr<MessageLoopProxy> message_loop_proxy, | 924 scoped_refptr<MessageLoopProxy> message_loop_proxy, |
911 PlatformFile file, | 925 PlatformFile file, |
912 StatusCallback* callback) { | 926 StatusCallback* callback) { |
913 return Start(FROM_HERE, message_loop_proxy, new RelayFlush(file, callback)); | 927 return Start(FROM_HERE, message_loop_proxy, new RelayFlush(file, callback)); |
914 } | 928 } |
915 | 929 |
916 } // namespace base | 930 } // namespace base |
OLD | NEW |