| 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());
|
|
|