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

Unified Diff: chrome/browser/chromeos/fileapi/file_system_backend.cc

Issue 1030133002: Move the check for fileBrowserHandler permission to FileBrowserHandler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed test for OS != OS_CHROMEOS. Created 5 years, 9 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/chromeos/fileapi/file_system_backend.cc
diff --git a/chrome/browser/chromeos/fileapi/file_system_backend.cc b/chrome/browser/chromeos/fileapi/file_system_backend.cc
index a0a7580e593b7d09a16cd05956914dd330f3dc20..96f88bd220660f1b615dcec55c64919f19380aca 100644
--- a/chrome/browser/chromeos/fileapi/file_system_backend.cc
+++ b/chrome/browser/chromeos/fileapi/file_system_backend.cc
@@ -39,11 +39,9 @@ FileSystemBackend::FileSystemBackend(
FileSystemBackendDelegate* drive_delegate,
FileSystemBackendDelegate* file_system_provider_delegate,
FileSystemBackendDelegate* mtp_delegate,
- scoped_refptr<storage::SpecialStoragePolicy> special_storage_policy,
scoped_refptr<storage::ExternalMountPoints> mount_points,
storage::ExternalMountPoints* system_mount_points)
- : special_storage_policy_(special_storage_policy),
- file_access_permissions_(new FileAccessPermissions()),
+ : file_access_permissions_(new FileAccessPermissions()),
local_file_util_(storage::AsyncFileUtil::CreateForLocalFileSystem()),
drive_delegate_(drive_delegate),
file_system_provider_delegate_(file_system_provider_delegate),
@@ -185,25 +183,12 @@ bool FileSystemBackend::IsAccessAllowed(
return true;
}
- // Check first to make sure this extension has fileBrowserHander permissions.
- if (!special_storage_policy_.get() ||
- !special_storage_policy_->IsFileHandler(extension_id))
- return false;
-
return file_access_permissions_->HasAccessPermission(extension_id,
url.virtual_path());
}
void FileSystemBackend::GrantFileAccessToExtension(
const std::string& extension_id, const base::FilePath& virtual_path) {
- if (!special_storage_policy_.get())
- return;
- // All we care about here is access from extensions for now.
- if (!special_storage_policy_->IsFileHandler(extension_id)) {
- NOTREACHED();
- return;
- }
-
std::string id;
storage::FileSystemType type;
std::string cracked_id;
« no previous file with comments | « chrome/browser/chromeos/fileapi/file_system_backend.h ('k') | chrome/browser/chromeos/fileapi/file_system_backend_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698