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

Unified Diff: chrome/browser/chromeos/file_manager/file_browser_handlers.cc

Issue 251593005: Files.app auto pop up for MTP storage. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | « chrome/browser/chromeos/extensions/file_manager/event_router.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/file_manager/file_browser_handlers.cc
diff --git a/chrome/browser/chromeos/file_manager/file_browser_handlers.cc b/chrome/browser/chromeos/file_manager/file_browser_handlers.cc
index e5935e4920b782992649d047e7472cf42739a415..21c3e89dcd1eb3ef79ff0bd079959a1c75c4991f 100644
--- a/chrome/browser/chromeos/file_manager/file_browser_handlers.cc
+++ b/chrome/browser/chromeos/file_manager/file_browser_handlers.cc
@@ -215,12 +215,15 @@ FileBrowserHandlerExecutor::SetupFileAccessPermissions(
base::FilePath local_path = url.path();
base::FilePath virtual_path = url.virtual_path();
- bool is_drive_file = url.type() == fileapi::kFileSystemTypeDrive;
+ const bool is_drive_file = url.type() == fileapi::kFileSystemTypeDrive;
DCHECK(!is_drive_file || drive::util::IsUnderDriveMountPoint(local_path));
- // If the file is under drive mount point, there is no actual file to be
- // found on the url.path().
- if (!is_drive_file) {
+ const bool is_native_file =
+ url.type() == fileapi::kFileSystemTypeNativeLocal ||
+ url.type() == fileapi::kFileSystemTypeRestrictedNativeLocal;
+
+ // If the file is from a physical volume, actual file must be found.
+ if (is_native_file) {
if (!base::PathExists(local_path) ||
base::IsLink(local_path) ||
!base::GetFileInfo(local_path, &file_info)) {
« no previous file with comments | « chrome/browser/chromeos/extensions/file_manager/event_router.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698