| 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_manager/file_handler_util.h" | 5 #include "chrome/browser/chromeos/extensions/file_manager/file_handler_util.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/i18n/case_conversion.h" | 9 #include "base/i18n/case_conversion.h" |
| 10 #include "base/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
| (...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 817 scoped_refptr<fileapi::FileSystemContext> file_system_context_handler = | 817 scoped_refptr<fileapi::FileSystemContext> file_system_context_handler = |
| 818 BrowserContext::GetStoragePartitionForSite(profile(), site)-> | 818 BrowserContext::GetStoragePartitionForSite(profile(), site)-> |
| 819 GetFileSystemContext(); | 819 GetFileSystemContext(); |
| 820 | 820 |
| 821 GURL origin_url = | 821 GURL origin_url = |
| 822 Extension::GetBaseURLFromExtensionId(extension->id()).GetOrigin(); | 822 Extension::GetBaseURLFromExtensionId(extension->id()).GetOrigin(); |
| 823 BrowserThread::PostTask( | 823 BrowserThread::PostTask( |
| 824 BrowserThread::FILE, FROM_HERE, | 824 BrowserThread::FILE, FROM_HERE, |
| 825 base::Bind(&fileapi::FileSystemContext::OpenFileSystem, | 825 base::Bind(&fileapi::FileSystemContext::OpenFileSystem, |
| 826 file_system_context_handler, | 826 file_system_context_handler, |
| 827 origin_url, fileapi::kFileSystemTypeExternal, false, // create | 827 origin_url, fileapi::kFileSystemTypeExternal, |
| 828 fileapi::OPEN_FILE_SYSTEM_FAIL_IF_NONEXISTENT, |
| 828 ExecuteTasksFileSystemCallbackDispatcher::CreateCallback( | 829 ExecuteTasksFileSystemCallbackDispatcher::CreateCallback( |
| 829 this, | 830 this, |
| 830 file_system_context_handler, | 831 file_system_context_handler, |
| 831 extension, | 832 extension, |
| 832 extension_pid, | 833 extension_pid, |
| 833 action_id_, | 834 action_id_, |
| 834 file_urls))); | 835 file_urls))); |
| 835 return true; | 836 return true; |
| 836 } | 837 } |
| 837 | 838 |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 971 extensions::LaunchPlatformAppWithFileHandler(profile(), GetExtension(), | 972 extensions::LaunchPlatformAppWithFileHandler(profile(), GetExtension(), |
| 972 action_id_, file_urls[i].path()); | 973 action_id_, file_urls[i].path()); |
| 973 } | 974 } |
| 974 | 975 |
| 975 if (!done.is_null()) | 976 if (!done.is_null()) |
| 976 done.Run(true); | 977 done.Run(true); |
| 977 return true; | 978 return true; |
| 978 } | 979 } |
| 979 | 980 |
| 980 } // namespace file_handler_util | 981 } // namespace file_handler_util |
| OLD | NEW |