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

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

Issue 10696208: Move ExtensionEventRouter and related into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed bug + latest master 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"
11 #include "base/string_util.h" 11 #include "base/string_util.h"
12 #include "base/stringprintf.h" 12 #include "base/stringprintf.h"
13 #include "base/utf_string_conversions.h" 13 #include "base/utf_string_conversions.h"
14 #include "chrome/browser/chromeos/gdata/gdata_util.h" 14 #include "chrome/browser/chromeos/gdata/gdata_util.h"
15 #include "chrome/browser/chromeos/extensions/file_manager_util.h" 15 #include "chrome/browser/chromeos/extensions/file_manager_util.h"
16 #include "chrome/browser/chromeos/gdata/drive_task_executor.h" 16 #include "chrome/browser/chromeos/gdata/drive_task_executor.h"
17 #include "chrome/browser/extensions/extension_event_router.h" 17 #include "chrome/browser/extensions/event_router.h"
18 #include "chrome/browser/extensions/extension_host.h" 18 #include "chrome/browser/extensions/extension_host.h"
19 #include "chrome/browser/extensions/extension_service.h" 19 #include "chrome/browser/extensions/extension_service.h"
20 #include "chrome/browser/extensions/extension_system.h" 20 #include "chrome/browser/extensions/extension_system.h"
21 #include "chrome/browser/extensions/extension_tab_util.h" 21 #include "chrome/browser/extensions/extension_tab_util.h"
22 #include "chrome/browser/extensions/lazy_background_task_queue.h" 22 #include "chrome/browser/extensions/lazy_background_task_queue.h"
23 #include "chrome/browser/prefs/scoped_user_pref_update.h" 23 #include "chrome/browser/prefs/scoped_user_pref_update.h"
24 #include "chrome/browser/profiles/profile.h" 24 #include "chrome/browser/profiles/profile.h"
25 #include "chrome/browser/profiles/profile_manager.h" 25 #include "chrome/browser/profiles/profile_manager.h"
26 #include "chrome/browser/ui/browser.h" 26 #include "chrome/browser/ui/browser.h"
27 #include "chrome/browser/ui/browser_finder.h" 27 #include "chrome/browser/ui/browser_finder.h"
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after
797 int handler_pid_in, 797 int handler_pid_in,
798 ExtensionHost* host) { 798 ExtensionHost* host) {
799 int handler_pid = host ? host->render_process_host()->GetID() : 799 int handler_pid = host ? host->render_process_host()->GetID() :
800 handler_pid_in; 800 handler_pid_in;
801 801
802 if (handler_pid <= 0) { 802 if (handler_pid <= 0) {
803 ExecuteDoneOnUIThread(false); 803 ExecuteDoneOnUIThread(false);
804 return; 804 return;
805 } 805 }
806 806
807 ExtensionEventRouter* event_router = profile()->GetExtensionEventRouter(); 807 extensions::EventRouter* event_router = profile()->GetExtensionEventRouter();
808 if (!event_router) { 808 if (!event_router) {
809 ExecuteDoneOnUIThread(false); 809 ExecuteDoneOnUIThread(false);
810 return; 810 return;
811 } 811 }
812 812
813 SetupHandlerHostFileAccessPermissions(handler_pid); 813 SetupHandlerHostFileAccessPermissions(handler_pid);
814 814
815 scoped_ptr<ListValue> event_args(new ListValue()); 815 scoped_ptr<ListValue> event_args(new ListValue());
816 event_args->Append(Value::CreateStringValue(action_id_)); 816 event_args->Append(Value::CreateStringValue(action_id_));
817 DictionaryValue* details = new DictionaryValue(); 817 DictionaryValue* details = new DictionaryValue();
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
891 handler_host_permissions_[i].first, 891 handler_host_permissions_[i].first,
892 handler_host_permissions_[i].second); 892 handler_host_permissions_[i].second);
893 } 893 }
894 894
895 // We don't need this anymore. 895 // We don't need this anymore.
896 handler_host_permissions_.clear(); 896 handler_host_permissions_.clear();
897 } 897 }
898 898
899 } // namespace file_handler_util 899 } // namespace file_handler_util
900 900
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698