| 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/extensions/extension_service.h" | 5 #include "chrome/browser/extensions/extension_service.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 #include "webkit/database/database_tracker.h" | 113 #include "webkit/database/database_tracker.h" |
| 114 #include "webkit/database/database_util.h" | 114 #include "webkit/database/database_util.h" |
| 115 #if defined(OS_CHROMEOS) | 115 #if defined(OS_CHROMEOS) |
| 116 #include "chrome/browser/chromeos/cros/cros_library.h" | 116 #include "chrome/browser/chromeos/cros/cros_library.h" |
| 117 #include "chrome/browser/chromeos/extensions/bluetooth_event_router.h" | 117 #include "chrome/browser/chromeos/extensions/bluetooth_event_router.h" |
| 118 #include "chrome/browser/chromeos/extensions/file_browser_event_router.h" | 118 #include "chrome/browser/chromeos/extensions/file_browser_event_router.h" |
| 119 #include "chrome/browser/chromeos/extensions/input_method_event_router.h" | 119 #include "chrome/browser/chromeos/extensions/input_method_event_router.h" |
| 120 #include "chrome/browser/chromeos/extensions/media_player_event_router.h" | 120 #include "chrome/browser/chromeos/extensions/media_player_event_router.h" |
| 121 #include "chrome/browser/chromeos/input_method/input_method_manager.h" | 121 #include "chrome/browser/chromeos/input_method/input_method_manager.h" |
| 122 #include "chrome/browser/extensions/api/input_ime/input_ime_api.h" | 122 #include "chrome/browser/extensions/api/input_ime/input_ime_api.h" |
| 123 #include "content/public/browser/storage_partition.h" |
| 123 #include "webkit/fileapi/file_system_context.h" | 124 #include "webkit/fileapi/file_system_context.h" |
| 124 #include "webkit/fileapi/file_system_mount_point_provider.h" | 125 #include "webkit/fileapi/file_system_mount_point_provider.h" |
| 125 #endif | 126 #endif |
| 126 | 127 |
| 127 using content::BrowserContext; | 128 using content::BrowserContext; |
| 128 using content::BrowserThread; | 129 using content::BrowserThread; |
| 129 using content::DevToolsAgentHost; | 130 using content::DevToolsAgentHost; |
| 130 using content::DevToolsAgentHostRegistry; | 131 using content::DevToolsAgentHostRegistry; |
| 131 using content::PluginService; | 132 using content::PluginService; |
| 132 using extensions::CrxInstaller; | 133 using extensions::CrxInstaller; |
| (...skipping 957 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1090 } | 1091 } |
| 1091 | 1092 |
| 1092 system_->UnregisterExtensionWithRequestContexts(extension->id(), reason); | 1093 system_->UnregisterExtensionWithRequestContexts(extension->id(), reason); |
| 1093 profile_->GetExtensionSpecialStoragePolicy()-> | 1094 profile_->GetExtensionSpecialStoragePolicy()-> |
| 1094 RevokeRightsForExtension(extension); | 1095 RevokeRightsForExtension(extension); |
| 1095 | 1096 |
| 1096 ExtensionWebUI::UnregisterChromeURLOverrides( | 1097 ExtensionWebUI::UnregisterChromeURLOverrides( |
| 1097 profile_, extension->GetChromeURLOverrides()); | 1098 profile_, extension->GetChromeURLOverrides()); |
| 1098 | 1099 |
| 1099 #if defined(OS_CHROMEOS) | 1100 #if defined(OS_CHROMEOS) |
| 1100 // Revoke external file access to | 1101 // Revoke external file access to third party extensions. |
| 1101 if (BrowserContext::GetFileSystemContext(profile_) && | 1102 fileapi::FileSystemContext* context = |
| 1102 BrowserContext::GetFileSystemContext(profile_)->external_provider()) { | 1103 BrowserContext::GetDefaultStoragePartition(profile_)-> |
| 1103 BrowserContext::GetFileSystemContext(profile_)->external_provider()-> | 1104 GetFileSystemContext(); |
| 1104 RevokeAccessForExtension(extension->id()); | 1105 if (context && context->external_provider()) { |
| 1106 context->external_provider()->RevokeAccessForExtension(extension->id()); |
| 1105 } | 1107 } |
| 1106 | 1108 |
| 1107 if (extension->input_components().size() > 0) { | 1109 if (extension->input_components().size() > 0) { |
| 1108 extensions::InputImeEventRouter::GetInstance()->UnregisterAllImes( | 1110 extensions::InputImeEventRouter::GetInstance()->UnregisterAllImes( |
| 1109 profile_, extension->id()); | 1111 profile_, extension->id()); |
| 1110 } | 1112 } |
| 1111 #endif | 1113 #endif |
| 1112 | 1114 |
| 1113 UpdateActiveExtensionsInCrashReporter(); | 1115 UpdateActiveExtensionsInCrashReporter(); |
| 1114 | 1116 |
| (...skipping 1509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2624 extensions::ExtensionHost* extension_host) { | 2626 extensions::ExtensionHost* extension_host) { |
| 2625 if (!extension_host) | 2627 if (!extension_host) |
| 2626 return; | 2628 return; |
| 2627 | 2629 |
| 2628 #if !defined(OS_ANDROID) | 2630 #if !defined(OS_ANDROID) |
| 2629 extensions::LaunchPlatformApp(extension_host->profile(), | 2631 extensions::LaunchPlatformApp(extension_host->profile(), |
| 2630 extension_host->extension(), | 2632 extension_host->extension(), |
| 2631 NULL, FilePath()); | 2633 NULL, FilePath()); |
| 2632 #endif | 2634 #endif |
| 2633 } | 2635 } |
| OLD | NEW |