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

Unified Diff: chrome/browser/media_galleries/fileapi/av_scanning_file_validator.cc

Issue 145303002: Convert Media Galleries to use base::File (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 11 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
Index: chrome/browser/media_galleries/fileapi/av_scanning_file_validator.cc
diff --git a/chrome/browser/media_galleries/fileapi/av_scanning_file_validator.cc b/chrome/browser/media_galleries/fileapi/av_scanning_file_validator.cc
index 2541040875eb73f1463d5747cbac624a19a33a6a..6c3100c9d62dd9aaca49f00b58a5209ce622c47d 100644
--- a/chrome/browser/media_galleries/fileapi/av_scanning_file_validator.cc
+++ b/chrome/browser/media_galleries/fileapi/av_scanning_file_validator.cc
@@ -26,8 +26,7 @@ using content::BrowserThread;
namespace {
#if defined(OS_WIN)
-base::PlatformFileError ScanFile(
- const base::FilePath& dest_platform_path) {
+base::File::Error ScanFile(const base::FilePath& dest_platform_path) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
base::win::ScopedComPtr<IAttachmentExecute> attachment_services;
@@ -36,20 +35,20 @@ base::PlatformFileError ScanFile(
if (FAILED(hr)) {
// The thread must have COM initialized.
DCHECK_NE(CO_E_NOTINITIALIZED, hr);
- return base::PLATFORM_FILE_ERROR_SECURITY;
+ return base::File::FILE_ERROR_SECURITY;
}
hr = attachment_services->SetLocalPath(dest_platform_path.value().c_str());
if (FAILED(hr))
- return base::PLATFORM_FILE_ERROR_SECURITY;
+ return base::File::FILE_ERROR_SECURITY;
// A failure in the Save() call below could result in the downloaded file
// being deleted.
HRESULT scan_result = attachment_services->Save();
if (scan_result == S_OK)
- return base::PLATFORM_FILE_OK;
+ return base::File::FILE_OK;
- return base::PLATFORM_FILE_ERROR_SECURITY;
+ return base::File::FILE_ERROR_SECURITY;
}
#endif
@@ -69,7 +68,7 @@ void AVScanningFileValidator::StartPostWriteValidation(
base::Bind(&ScanFile, dest_platform_path),
result_callback);
#else
- result_callback.Run(base::PLATFORM_FILE_OK);
+ result_callback.Run(base::File::FILE_OK);
#endif
}

Powered by Google App Engine
This is Rietveld 408576698