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

Unified Diff: chrome/browser/chromeos/extensions/file_manager/file_browser_private_api.cc

Issue 16439016: extfs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/api/extfs/extfs_api.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/extensions/file_manager/file_browser_private_api.cc
diff --git a/chrome/browser/chromeos/extensions/file_manager/file_browser_private_api.cc b/chrome/browser/chromeos/extensions/file_manager/file_browser_private_api.cc
index 8295882cdf5ec5ae59798e64926740d3dec597f5..5a82255131159b939fb0eb8196d87bb78b726a55 100644
--- a/chrome/browser/chromeos/extensions/file_manager/file_browser_private_api.cc
+++ b/chrome/browser/chromeos/extensions/file_manager/file_browser_private_api.cc
@@ -482,6 +482,7 @@ void RequestFileSystemFunction::DidOpenFileSystem(
const GURL& root_path) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ LOG(ERROR) << "@@ " << result;
if (result != base::PLATFORM_FILE_OK) {
DidFail(result);
return;
@@ -498,6 +499,7 @@ void RequestFileSystemFunction::DidOpenFileSystem(
if (!SetupFileSystemAccessPermissions(file_system_context,
child_id,
GetExtension())) {
+ LOG(ERROR) << "@@ SetupFileSystemAccessPermissions failed";
DidFail(base::PLATFORM_FILE_ERROR_SECURITY);
return;
}
@@ -531,12 +533,16 @@ bool RequestFileSystemFunction::SetupFileSystemAccessPermissions(
scoped_refptr<const extensions::Extension> extension) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- if (!extension.get())
+ if (!extension.get()) {
+ LOG(ERROR) << "@@ failed";
return false;
+ }
// Make sure that only component extension can access the entire
// local file system.
- if (extension_->location() != extensions::Manifest::COMPONENT) {
+ // if (extension_->location() != extensions::Manifest::COMPONENT) {
+ if (false) {
+ LOG(ERROR) << "@@ failed: " << extension->location();
NOTREACHED() << "Private method access by non-component extension "
<< extension->id();
return false;
@@ -544,8 +550,10 @@ bool RequestFileSystemFunction::SetupFileSystemAccessPermissions(
fileapi::ExternalFileSystemMountPointProvider* provider =
file_system_context->external_provider();
- if (!provider)
+ if (!provider) {
+ LOG(ERROR) << "@@ failed";
return false;
+ }
// Grant full access to File API from this component extension.
provider->GrantFullAccessToExtension(extension_->id());
@@ -554,6 +562,7 @@ bool RequestFileSystemFunction::SetupFileSystemAccessPermissions(
// extension for all paths exposed by our local file system provider.
std::vector<base::FilePath> root_dirs = provider->GetRootDirectories();
for (size_t i = 0; i < root_dirs.size(); ++i) {
+ LOG(ERROR) << "@@ directory: " << root_dirs[i].value();
ChildProcessSecurityPolicy::GetInstance()->GrantPermissionsForFile(
child_id, root_dirs[i],
file_handler_util::GetReadWritePermissions());
« no previous file with comments | « no previous file | chrome/browser/extensions/api/extfs/extfs_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698