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

Side by Side Diff: chrome/browser/media_galleries/fileapi/native_media_file_util.cc

Issue 101143006: Convert base::file_util to use File instead of PlatformFile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove base:: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #include "chrome/browser/media_galleries/fileapi/native_media_file_util.h" 5 #include "chrome/browser/media_galleries/fileapi/native_media_file_util.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 base::FilePath* local_file_path) { 646 base::FilePath* local_file_path) {
647 DCHECK(IsOnTaskRunnerThread(context)); 647 DCHECK(IsOnTaskRunnerThread(context));
648 base::FilePath file_path; 648 base::FilePath file_path;
649 base::PlatformFileError error = 649 base::PlatformFileError error =
650 GetLocalFilePath(context, file_system_url, &file_path); 650 GetLocalFilePath(context, file_system_url, &file_path);
651 if (error != base::PLATFORM_FILE_OK) 651 if (error != base::PLATFORM_FILE_OK)
652 return error; 652 return error;
653 653
654 if (!base::PathExists(file_path)) 654 if (!base::PathExists(file_path))
655 return failure_error; 655 return failure_error;
656 base::PlatformFileInfo file_info; 656 base::File::Info file_info;
657 if (!base::GetFileInfo(file_path, &file_info)) 657 if (!base::GetFileInfo(file_path, &file_info))
658 return base::PLATFORM_FILE_ERROR_FAILED; 658 return base::PLATFORM_FILE_ERROR_FAILED;
659 659
660 if (!file_info.is_directory && 660 if (!file_info.is_directory &&
661 !media_path_filter_->Match(file_path)) { 661 !media_path_filter_->Match(file_path)) {
662 return failure_error; 662 return failure_error;
663 } 663 }
664 664
665 *local_file_path = file_path; 665 *local_file_path = file_path;
666 return base::PLATFORM_FILE_OK; 666 return base::PLATFORM_FILE_OK;
667 } 667 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698