OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/file_manager/snapshot_manager.h" | 5 #include "chrome/browser/chromeos/file_manager/snapshot_manager.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/sys_info.h" | 8 #include "base/sys_info.h" |
9 #include "chrome/browser/chromeos/file_manager/app_id.h" | 9 #include "chrome/browser/chromeos/file_manager/app_id.h" |
10 #include "chrome/browser/chromeos/file_manager/fileapi_util.h" | 10 #include "chrome/browser/chromeos/file_manager/fileapi_util.h" |
11 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
12 #include "content/public/browser/browser_thread.h" | 12 #include "content/public/browser/browser_thread.h" |
13 #include "google_apis/drive/task_util.h" | 13 #include "google_apis/drive/task_util.h" |
| 14 #include "storage/browser/blob/shareable_file_reference.h" |
14 #include "storage/browser/fileapi/file_system_context.h" | 15 #include "storage/browser/fileapi/file_system_context.h" |
15 #include "storage/common/blob/shareable_file_reference.h" | |
16 #include "third_party/cros_system_api/constants/cryptohome.h" | 16 #include "third_party/cros_system_api/constants/cryptohome.h" |
17 | 17 |
18 namespace file_manager { | 18 namespace file_manager { |
19 namespace { | 19 namespace { |
20 | 20 |
21 typedef base::Callback<void(int64)> GetNecessaryFreeSpaceCallback; | 21 typedef base::Callback<void(int64)> GetNecessaryFreeSpaceCallback; |
22 | 22 |
23 // Part of ComputeSpaceNeedToBeFreed. | 23 // Part of ComputeSpaceNeedToBeFreed. |
24 int64 ComputeSpaceNeedToBeFreedAfterGetMetadataOnBlockingPool( | 24 int64 ComputeSpaceNeedToBeFreedAfterGetMetadataOnBlockingPool( |
25 const base::FilePath& path, | 25 const base::FilePath& path, |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 if (result != base::File::FILE_OK) { | 203 if (result != base::File::FILE_OK) { |
204 callback.Run(base::FilePath()); | 204 callback.Run(base::FilePath()); |
205 return; | 205 return; |
206 } | 206 } |
207 | 207 |
208 file_refs_.push_back(FileReferenceWithSizeInfo(file_ref, file_info.size)); | 208 file_refs_.push_back(FileReferenceWithSizeInfo(file_ref, file_info.size)); |
209 callback.Run(platform_path); | 209 callback.Run(platform_path); |
210 } | 210 } |
211 | 211 |
212 } // namespace file_manager | 212 } // namespace file_manager |
OLD | NEW |