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 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_FILE_CACHE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_FILE_CACHE_H_ |
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_CACHE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_CACHE_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 // |callback| must not be null. | 193 // |callback| must not be null. |
194 // Must be called on the UI thread. | 194 // Must be called on the UI thread. |
195 void MarkAsUnmountedOnUIThread(const base::FilePath& file_path, | 195 void MarkAsUnmountedOnUIThread(const base::FilePath& file_path, |
196 const FileOperationCallback& callback); | 196 const FileOperationCallback& callback); |
197 | 197 |
198 // Runs MarkDirty() on |blocking_task_runner_|, and calls |callback| with the | 198 // Runs MarkDirty() on |blocking_task_runner_|, and calls |callback| with the |
199 // result asynchronously. | 199 // result asynchronously. |
200 // |callback| must not be null. | 200 // |callback| must not be null. |
201 // Must be called on the UI thread. | 201 // Must be called on the UI thread. |
202 void MarkDirtyOnUIThread(const std::string& resource_id, | 202 void MarkDirtyOnUIThread(const std::string& resource_id, |
203 const std::string& md5, | |
204 const FileOperationCallback& callback); | 203 const FileOperationCallback& callback); |
205 | 204 |
206 // Marks the specified entry dirty. | 205 // Marks the specified entry dirty. |
207 FileError MarkDirty(const std::string& resource_id, | 206 FileError MarkDirty(const std::string& resource_id); |
208 const std::string& md5); | |
209 | 207 |
210 // Clears dirty state of the specified entry. | 208 // Clears dirty state of the specified entry. |
211 FileError ClearDirty(const std::string& resource_id, | 209 FileError ClearDirty(const std::string& resource_id, |
212 const std::string& md5); | 210 const std::string& md5); |
213 | 211 |
214 // Runs Remove() on |blocking_task_runner_| and runs |callback| with the | 212 // Runs Remove() on |blocking_task_runner_| and runs |callback| with the |
215 // result. | 213 // result. |
216 // Must be called on the UI thread. | 214 // Must be called on the UI thread. |
217 void RemoveOnUIThread(const std::string& resource_id, | 215 void RemoveOnUIThread(const std::string& resource_id, |
218 const FileOperationCallback& callback); | 216 const FileOperationCallback& callback); |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 // this value. | 304 // this value. |
307 // | 305 // |
308 // Copied from cryptohome/homedirs.h. | 306 // Copied from cryptohome/homedirs.h. |
309 // TODO(satorux): Share the constant. | 307 // TODO(satorux): Share the constant. |
310 const int64 kMinFreeSpace = 512 * 1LL << 20; | 308 const int64 kMinFreeSpace = 512 * 1LL << 20; |
311 | 309 |
312 } // namespace internal | 310 } // namespace internal |
313 } // namespace drive | 311 } // namespace drive |
314 | 312 |
315 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_CACHE_H_ | 313 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_FILE_CACHE_H_ |
OLD | NEW |