OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "components/drive/chromeos/file_system.h" | 5 #include "components/drive/chromeos/file_system.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/files/file_util.h" | 11 #include "base/files/file_util.h" |
| 12 #include "base/sequenced_task_runner.h" |
| 13 #include "base/single_thread_task_runner.h" |
12 #include "components/drive/chromeos/change_list_loader.h" | 14 #include "components/drive/chromeos/change_list_loader.h" |
13 #include "components/drive/chromeos/directory_loader.h" | 15 #include "components/drive/chromeos/directory_loader.h" |
14 #include "components/drive/chromeos/file_cache.h" | 16 #include "components/drive/chromeos/file_cache.h" |
15 #include "components/drive/chromeos/file_system/copy_operation.h" | 17 #include "components/drive/chromeos/file_system/copy_operation.h" |
16 #include "components/drive/chromeos/file_system/create_directory_operation.h" | 18 #include "components/drive/chromeos/file_system/create_directory_operation.h" |
17 #include "components/drive/chromeos/file_system/create_file_operation.h" | 19 #include "components/drive/chromeos/file_system/create_file_operation.h" |
18 #include "components/drive/chromeos/file_system/download_operation.h" | 20 #include "components/drive/chromeos/file_system/download_operation.h" |
19 #include "components/drive/chromeos/file_system/get_file_for_saving_operation.h" | 21 #include "components/drive/chromeos/file_system/get_file_for_saving_operation.h" |
20 #include "components/drive/chromeos/file_system/move_operation.h" | 22 #include "components/drive/chromeos/file_system/move_operation.h" |
21 #include "components/drive/chromeos/file_system/open_file_operation.h" | 23 #include "components/drive/chromeos/file_system/open_file_operation.h" |
(...skipping 1042 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1064 | 1066 |
1065 void FileSystem::CalculateEvictableCacheSize( | 1067 void FileSystem::CalculateEvictableCacheSize( |
1066 const CacheSizeCallback& callback) { | 1068 const CacheSizeCallback& callback) { |
1067 DCHECK(thread_checker_.CalledOnValidThread()); | 1069 DCHECK(thread_checker_.CalledOnValidThread()); |
1068 DCHECK(!callback.is_null()); | 1070 DCHECK(!callback.is_null()); |
1069 base::PostTaskAndReplyWithResult( | 1071 base::PostTaskAndReplyWithResult( |
1070 blocking_task_runner_.get(), FROM_HERE, | 1072 blocking_task_runner_.get(), FROM_HERE, |
1071 base::Bind(&CalculateEvictableCacheSizeOnBlockingPool, cache_), callback); | 1073 base::Bind(&CalculateEvictableCacheSizeOnBlockingPool, cache_), callback); |
1072 } | 1074 } |
1073 } // namespace drive | 1075 } // namespace drive |
OLD | NEW |