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

Side by Side Diff: chrome/browser/chromeos/drive/file_system/download_operation.cc

Issue 16107004: drive: Stop returning FilePath from GetResourceEntryById (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/download_operation.h" 5 #include "chrome/browser/chromeos/drive/file_system/download_operation.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/task_runner_util.h" 10 #include "base/task_runner_util.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 } 76 }
77 77
78 // Calls CheckPreConditionForEnsureFileDownloaded() with the entry specified by 78 // Calls CheckPreConditionForEnsureFileDownloaded() with the entry specified by
79 // the given ID. 79 // the given ID.
80 FileError CheckPreConditionForEnsureFileDownloadedByResourceId( 80 FileError CheckPreConditionForEnsureFileDownloadedByResourceId(
81 internal::ResourceMetadata* metadata, 81 internal::ResourceMetadata* metadata,
82 internal::FileCache* cache, 82 internal::FileCache* cache,
83 const std::string& resource_id, 83 const std::string& resource_id,
84 base::FilePath* cache_file_path, 84 base::FilePath* cache_file_path,
85 ResourceEntry* entry) { 85 ResourceEntry* entry) {
86 FileError error = metadata->GetResourceEntryById(resource_id, NULL, entry); 86 FileError error = metadata->GetResourceEntryById(resource_id, entry);
87 if (error != FILE_ERROR_OK) 87 if (error != FILE_ERROR_OK)
88 return error; 88 return error;
89 return CheckPreConditionForEnsureFileDownloaded( 89 return CheckPreConditionForEnsureFileDownloaded(
90 metadata, cache, *entry, cache_file_path); 90 metadata, cache, *entry, cache_file_path);
91 } 91 }
92 92
93 // Calls CheckPreConditionForEnsureFileDownloaded() with the entry specified by 93 // Calls CheckPreConditionForEnsureFileDownloaded() with the entry specified by
94 // the given file path. 94 // the given file path.
95 FileError CheckPreConditionForEnsureFileDownloadedByPath( 95 FileError CheckPreConditionForEnsureFileDownloadedByPath(
96 internal::ResourceMetadata* metadata, 96 internal::ResourceMetadata* metadata,
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 observer_->OnDirectoryChangedByOperation(file_path.DirName()); 517 observer_->OnDirectoryChangedByOperation(file_path.DirName());
518 callback.OnComplete(*cache_file_path, entry.Pass()); 518 callback.OnComplete(*cache_file_path, entry.Pass());
519 } 519 }
520 520
521 void DownloadOperation::CancelJob(JobID job_id) { 521 void DownloadOperation::CancelJob(JobID job_id) {
522 scheduler_->CancelJob(job_id); 522 scheduler_->CancelJob(job_id);
523 } 523 }
524 524
525 } // namespace file_system 525 } // namespace file_system
526 } // namespace drive 526 } // namespace drive
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698