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 "chrome/browser/chromeos/drive/file_system.h" | 5 #include "chrome/browser/chromeos/drive/file_system.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
10 #include "chrome/browser/chromeos/drive/change_list_loader.h" | 10 #include "chrome/browser/chromeos/drive/change_list_loader.h" |
11 #include "chrome/browser/chromeos/drive/directory_loader.h" | 11 #include "chrome/browser/chromeos/drive/directory_loader.h" |
12 #include "chrome/browser/chromeos/drive/drive.pb.h" | 12 #include "chrome/browser/chromeos/drive/drive.pb.h" |
13 #include "chrome/browser/chromeos/drive/drive_pref_names.h" | 13 #include "chrome/browser/chromeos/drive/drive_pref_names.h" |
14 #include "chrome/browser/chromeos/drive/file_cache.h" | 14 #include "chrome/browser/chromeos/drive/file_cache.h" |
15 #include "chrome/browser/chromeos/drive/file_change.h" | 15 #include "chrome/browser/chromeos/drive/file_change.h" |
16 #include "chrome/browser/chromeos/drive/file_system/copy_operation.h" | 16 #include "chrome/browser/chromeos/drive/file_system/copy_operation.h" |
17 #include "chrome/browser/chromeos/drive/file_system/create_directory_operation.h
" | 17 #include "chrome/browser/chromeos/drive/file_system/create_directory_operation.h
" |
18 #include "chrome/browser/chromeos/drive/file_system/create_file_operation.h" | 18 #include "chrome/browser/chromeos/drive/file_system/create_file_operation.h" |
19 #include "chrome/browser/chromeos/drive/file_system/download_operation.h" | 19 #include "chrome/browser/chromeos/drive/file_system/download_operation.h" |
20 #include "chrome/browser/chromeos/drive/file_system/get_file_for_saving_operatio
n.h" | 20 #include "chrome/browser/chromeos/drive/file_system/get_file_for_saving_operatio
n.h" |
21 #include "chrome/browser/chromeos/drive/file_system/move_operation.h" | 21 #include "chrome/browser/chromeos/drive/file_system/move_operation.h" |
22 #include "chrome/browser/chromeos/drive/file_system/open_file_operation.h" | 22 #include "chrome/browser/chromeos/drive/file_system/open_file_operation.h" |
23 #include "chrome/browser/chromeos/drive/file_system/remove_operation.h" | 23 #include "chrome/browser/chromeos/drive/file_system/remove_operation.h" |
24 #include "chrome/browser/chromeos/drive/file_system/search_operation.h" | 24 #include "chrome/browser/chromeos/drive/file_system/search_operation.h" |
25 #include "chrome/browser/chromeos/drive/file_system/set_property_operation.h" | 25 #include "chrome/browser/chromeos/drive/file_system/set_property_operation.h" |
26 #include "chrome/browser/chromeos/drive/file_system/touch_operation.h" | 26 #include "chrome/browser/chromeos/drive/file_system/touch_operation.h" |
27 #include "chrome/browser/chromeos/drive/file_system/truncate_operation.h" | 27 #include "chrome/browser/chromeos/drive/file_system/truncate_operation.h" |
| 28 #include "chrome/browser/chromeos/drive/file_system_core_util.h" |
28 #include "chrome/browser/chromeos/drive/file_system_observer.h" | 29 #include "chrome/browser/chromeos/drive/file_system_observer.h" |
29 #include "chrome/browser/chromeos/drive/file_system_util.h" | |
30 #include "chrome/browser/chromeos/drive/job_scheduler.h" | 30 #include "chrome/browser/chromeos/drive/job_scheduler.h" |
31 #include "chrome/browser/chromeos/drive/remove_stale_cache_files.h" | 31 #include "chrome/browser/chromeos/drive/remove_stale_cache_files.h" |
32 #include "chrome/browser/chromeos/drive/resource_entry_conversion.h" | 32 #include "chrome/browser/chromeos/drive/resource_entry_conversion.h" |
33 #include "chrome/browser/chromeos/drive/search_metadata.h" | 33 #include "chrome/browser/chromeos/drive/search_metadata.h" |
34 #include "chrome/browser/chromeos/drive/sync_client.h" | 34 #include "chrome/browser/chromeos/drive/sync_client.h" |
35 #include "google_apis/drive/drive_api_parser.h" | 35 #include "google_apis/drive/drive_api_parser.h" |
36 | 36 |
37 namespace drive { | 37 namespace drive { |
38 namespace { | 38 namespace { |
39 | 39 |
(...skipping 998 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1038 int64 num_bytes, | 1038 int64 num_bytes, |
1039 const FreeDiskSpaceCallback& callback) { | 1039 const FreeDiskSpaceCallback& callback) { |
1040 DCHECK(thread_checker_.CalledOnValidThread()); | 1040 DCHECK(thread_checker_.CalledOnValidThread()); |
1041 DCHECK(!callback.is_null()); | 1041 DCHECK(!callback.is_null()); |
1042 base::PostTaskAndReplyWithResult( | 1042 base::PostTaskAndReplyWithResult( |
1043 blocking_task_runner_.get(), FROM_HERE, | 1043 blocking_task_runner_.get(), FROM_HERE, |
1044 base::Bind(&FreeDiskSpaceIfNeededForOnBlockingPool, cache_, num_bytes), | 1044 base::Bind(&FreeDiskSpaceIfNeededForOnBlockingPool, cache_, num_bytes), |
1045 callback); | 1045 callback); |
1046 } | 1046 } |
1047 } // namespace drive | 1047 } // namespace drive |
OLD | NEW |