| OLD | NEW |
| 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/chromeos/extensions/file_browser_private_api.h" | 5 #include "chrome/browser/chromeos/extensions/file_browser_private_api.h" |
| 6 | 6 |
| 7 #include <sys/stat.h> | 7 #include <sys/stat.h> |
| 8 #include <sys/statvfs.h> | 8 #include <sys/statvfs.h> |
| 9 #include <sys/types.h> | 9 #include <sys/types.h> |
| 10 #include <utime.h> | 10 #include <utime.h> |
| (...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 529 DCHECK(function_); | 529 DCHECK(function_); |
| 530 } | 530 } |
| 531 | 531 |
| 532 // Grants file system access permissions to file browser component. | 532 // Grants file system access permissions to file browser component. |
| 533 bool SetupFileSystemAccessPermissions() { | 533 bool SetupFileSystemAccessPermissions() { |
| 534 if (!extension_.get()) | 534 if (!extension_.get()) |
| 535 return false; | 535 return false; |
| 536 | 536 |
| 537 // Make sure that only component extension can access the entire | 537 // Make sure that only component extension can access the entire |
| 538 // local file system. | 538 // local file system. |
| 539 if (extension_->location() != Extension::COMPONENT) { | 539 if (extension_->location() != extensions::Manifest::COMPONENT) { |
| 540 NOTREACHED() << "Private method access by non-component extension " | 540 NOTREACHED() << "Private method access by non-component extension " |
| 541 << extension_->id(); | 541 << extension_->id(); |
| 542 return false; | 542 return false; |
| 543 } | 543 } |
| 544 | 544 |
| 545 fileapi::ExternalFileSystemMountPointProvider* provider = | 545 fileapi::ExternalFileSystemMountPointProvider* provider = |
| 546 file_system_context_->external_provider(); | 546 file_system_context_->external_provider(); |
| 547 if (!provider) | 547 if (!provider) |
| 548 return false; | 548 return false; |
| 549 | 549 |
| (...skipping 2590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3140 // Keep the refcount until the zipping is complete on utility process. | 3140 // Keep the refcount until the zipping is complete on utility process. |
| 3141 AddRef(); | 3141 AddRef(); |
| 3142 return true; | 3142 return true; |
| 3143 } | 3143 } |
| 3144 | 3144 |
| 3145 void ZipSelectionFunction::OnZipDone(bool success) { | 3145 void ZipSelectionFunction::OnZipDone(bool success) { |
| 3146 SetResult(new base::FundamentalValue(success)); | 3146 SetResult(new base::FundamentalValue(success)); |
| 3147 SendResponse(true); | 3147 SendResponse(true); |
| 3148 Release(); | 3148 Release(); |
| 3149 } | 3149 } |
| OLD | NEW |