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_GDATA_GDATA_FILE_SYSTEM_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ |
6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ | 6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <sys/stat.h> | 9 #include <sys/stat.h> |
10 | 10 |
(...skipping 1136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1147 void FreeDiskSpaceIfNeeded(bool* has_enough_space); | 1147 void FreeDiskSpaceIfNeeded(bool* has_enough_space); |
1148 | 1148 |
1149 // Starts downloading a file if we have enough disk space indicated by | 1149 // Starts downloading a file if we have enough disk space indicated by |
1150 // |has_enough_space|. | 1150 // |has_enough_space|. |
1151 void StartDownloadFileIfEnoughSpace(const GetFileFromCacheParams& params, | 1151 void StartDownloadFileIfEnoughSpace(const GetFileFromCacheParams& params, |
1152 const FilePath& cache_file_path, | 1152 const FilePath& cache_file_path, |
1153 bool* has_enough_space); | 1153 bool* has_enough_space); |
1154 | 1154 |
1155 // Cache internal helper functions. | 1155 // Cache internal helper functions. |
1156 | 1156 |
1157 // Unsafe (unlocked) version of InitializeCacheIfnecessary method. | |
1158 void UnsafeInitializeCacheIfNecessary(); | |
satorux1
2012/04/30 06:22:09
one less function is great!
| |
1159 | |
1160 // Scans cache subdirectory |sub_dir_type| and build or update |cache_map| | 1157 // Scans cache subdirectory |sub_dir_type| and build or update |cache_map| |
1161 // with found file blobs or symlinks. | 1158 // with found file blobs or symlinks. |
1162 void ScanCacheDirectory( | 1159 void ScanCacheDirectory( |
1163 GDataRootDirectory::CacheSubDirectoryType sub_dir_type, | 1160 GDataRootDirectory::CacheSubDirectoryType sub_dir_type, |
1164 GDataRootDirectory::CacheMap* cache_map); | 1161 GDataRootDirectory::CacheMap* cache_map); |
1165 | 1162 |
1166 // Wrapper task around any sequenced task that runs on IO thread pool that | 1163 // Wrapper task around any sequenced task that runs on IO thread pool that |
1167 // makes sure |in_shutdown_| and |on_io_completed_| are handled properly in | 1164 // makes sure |in_shutdown_| and |on_io_completed_| are handled properly in |
1168 // the right order. | 1165 // the right order. |
1169 void RunTaskOnIOThreadPool(const base::Closure& task); | 1166 void RunTaskOnIOThreadPool(const base::Closure& task); |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1294 }; | 1291 }; |
1295 | 1292 |
1296 // Sets the free disk space getter for testing. | 1293 // Sets the free disk space getter for testing. |
1297 // The existing getter is deleted. | 1294 // The existing getter is deleted. |
1298 void SetFreeDiskSpaceGetterForTesting( | 1295 void SetFreeDiskSpaceGetterForTesting( |
1299 FreeDiskSpaceGetterInterface* getter); | 1296 FreeDiskSpaceGetterInterface* getter); |
1300 | 1297 |
1301 } // namespace gdata | 1298 } // namespace gdata |
1302 | 1299 |
1303 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ | 1300 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ |
OLD | NEW |