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_handler_util.h" | 5 #include "chrome/browser/chromeos/extensions/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 758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
769 ExecuteDoneOnUIThread(false); | 769 ExecuteDoneOnUIThread(false); |
770 return; | 770 return; |
771 } | 771 } |
772 | 772 |
773 if (handler_pid > 0) { | 773 if (handler_pid > 0) { |
774 SetupPermissionsAndDispatchEvent(file_system_name, file_system_root, | 774 SetupPermissionsAndDispatchEvent(file_system_name, file_system_root, |
775 file_list, handler_pid, NULL); | 775 file_list, handler_pid, NULL); |
776 } else { | 776 } else { |
777 // We have to wake the handler background page before we proceed. | 777 // We have to wake the handler background page before we proceed. |
778 extensions::LazyBackgroundTaskQueue* queue = | 778 extensions::LazyBackgroundTaskQueue* queue = |
779 ExtensionSystem::Get(profile())->lazy_background_task_queue(); | 779 extensions::ExtensionSystem::Get(profile())-> |
| 780 lazy_background_task_queue(); |
780 if (!queue->ShouldEnqueueTask(profile(), extension)) { | 781 if (!queue->ShouldEnqueueTask(profile(), extension)) { |
781 ExecuteDoneOnUIThread(false); | 782 ExecuteDoneOnUIThread(false); |
782 return; | 783 return; |
783 } | 784 } |
784 queue->AddPendingTask( | 785 queue->AddPendingTask( |
785 profile(), extension_id_, | 786 profile(), extension_id_, |
786 base::Bind(&ExtensionTaskExecutor::SetupPermissionsAndDispatchEvent, | 787 base::Bind(&ExtensionTaskExecutor::SetupPermissionsAndDispatchEvent, |
787 this, file_system_name, file_system_root, file_list, | 788 this, file_system_name, file_system_root, file_list, |
788 handler_pid)); | 789 handler_pid)); |
789 } | 790 } |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
890 handler_host_permissions_[i].first, | 891 handler_host_permissions_[i].first, |
891 handler_host_permissions_[i].second); | 892 handler_host_permissions_[i].second); |
892 } | 893 } |
893 | 894 |
894 // We don't need this anymore. | 895 // We don't need this anymore. |
895 handler_host_permissions_.clear(); | 896 handler_host_permissions_.clear(); |
896 } | 897 } |
897 | 898 |
898 } // namespace file_handler_util | 899 } // namespace file_handler_util |
899 | 900 |
OLD | NEW |