Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(722)

Unified Diff: chrome/browser/chromeos/drive/drive_cache.cc

Issue 13772005: chromeos: Stop directly downloading files to the cache directory from DriveFileSystem::GetResolvedF… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add DCHECK Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/drive/drive_file_system.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/drive/drive_cache.cc
diff --git a/chrome/browser/chromeos/drive/drive_cache.cc b/chrome/browser/chromeos/drive/drive_cache.cc
index e719c2033a81bc61c849a2d92b5954326cf08fa1..489bdf9d27d877d5771146f1d4a12818c4d986b5 100644
--- a/chrome/browser/chromeos/drive/drive_cache.cc
+++ b/chrome/browser/chromeos/drive/drive_cache.cc
@@ -581,17 +581,15 @@ DriveFileError DriveCache::StoreOnBlockingPool(
FileOperationType file_operation_type) {
AssertOnSequencedWorkerPool();
+ int64 file_size = 0;
if (file_operation_type == FILE_OPERATION_COPY) {
- int64 file_size;
if (!file_util::GetFileSize(source_path, &file_size)) {
LOG(WARNING) << "Couldn't get file size for: " << source_path.value();
return DRIVE_FILE_ERROR_FAILED;
}
-
- const bool enough_space = FreeDiskSpaceOnBlockingPoolIfNeededFor(file_size);
- if (!enough_space)
- return DRIVE_FILE_ERROR_NO_SPACE;
}
+ if (!FreeDiskSpaceOnBlockingPoolIfNeededFor(file_size))
+ return DRIVE_FILE_ERROR_NO_SPACE;
base::FilePath symlink_path;
CacheSubDirectoryType sub_dir_type = CACHE_TYPE_TMP;
« no previous file with comments | « no previous file | chrome/browser/chromeos/drive/drive_file_system.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698