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

Side by Side Diff: chrome/browser/chromeos/extensions/file_handler_util.cc

Issue 10626007: Move ExtensionSystem into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 5 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 unified diff | Download patch
OLDNEW
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 753 matching lines...) Expand 10 before | Expand all | Expand 10 after
764 ExecuteDoneOnUIThread(false); 764 ExecuteDoneOnUIThread(false);
765 return; 765 return;
766 } 766 }
767 767
768 if (handler_pid > 0) { 768 if (handler_pid > 0) {
769 SetupPermissionsAndDispatchEvent(file_system_name, file_system_root, 769 SetupPermissionsAndDispatchEvent(file_system_name, file_system_root,
770 file_list, handler_pid, NULL); 770 file_list, handler_pid, NULL);
771 } else { 771 } else {
772 // We have to wake the handler background page before we proceed. 772 // We have to wake the handler background page before we proceed.
773 extensions::LazyBackgroundTaskQueue* queue = 773 extensions::LazyBackgroundTaskQueue* queue =
774 ExtensionSystem::Get(profile())->lazy_background_task_queue(); 774 extensions::ExtensionSystem::Get(profile())->
775 lazy_background_task_queue();
775 if (!queue->ShouldEnqueueTask(profile(), extension)) { 776 if (!queue->ShouldEnqueueTask(profile(), extension)) {
776 ExecuteDoneOnUIThread(false); 777 ExecuteDoneOnUIThread(false);
777 return; 778 return;
778 } 779 }
779 queue->AddPendingTask( 780 queue->AddPendingTask(
780 profile(), extension_id_, 781 profile(), extension_id_,
781 base::Bind(&ExtensionTaskExecutor::SetupPermissionsAndDispatchEvent, 782 base::Bind(&ExtensionTaskExecutor::SetupPermissionsAndDispatchEvent,
782 this, file_system_name, file_system_root, file_list, 783 this, file_system_name, file_system_root, file_list,
783 handler_pid)); 784 handler_pid));
784 } 785 }
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
885 handler_host_permissions_[i].first, 886 handler_host_permissions_[i].first,
886 handler_host_permissions_[i].second); 887 handler_host_permissions_[i].second);
887 } 888 }
888 889
889 // We don't need this anymore. 890 // We don't need this anymore.
890 handler_host_permissions_.clear(); 891 handler_host_permissions_.clear();
891 } 892 }
892 893
893 } // namespace file_handler_util 894 } // namespace file_handler_util
894 895
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698