| 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 <iterator> | 8 #include <iterator> |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 #include "chrome/browser/themes/theme_service.h" | 72 #include "chrome/browser/themes/theme_service.h" |
| 73 #include "chrome/browser/themes/theme_service_factory.h" | 73 #include "chrome/browser/themes/theme_service_factory.h" |
| 74 #include "chrome/browser/ui/webui/favicon_source.h" | 74 #include "chrome/browser/ui/webui/favicon_source.h" |
| 75 #include "chrome/browser/ui/webui/ntp/thumbnail_source.h" | 75 #include "chrome/browser/ui/webui/ntp/thumbnail_source.h" |
| 76 #include "chrome/browser/ui/webui/theme_source.h" | 76 #include "chrome/browser/ui/webui/theme_source.h" |
| 77 #include "chrome/common/child_process_logging.h" | 77 #include "chrome/common/child_process_logging.h" |
| 78 #include "chrome/common/chrome_notification_types.h" | 78 #include "chrome/common/chrome_notification_types.h" |
| 79 #include "chrome/common/chrome_paths.h" | 79 #include "chrome/common/chrome_paths.h" |
| 80 #include "chrome/common/chrome_switches.h" | 80 #include "chrome/common/chrome_switches.h" |
| 81 #include "chrome/common/chrome_version_info.h" | 81 #include "chrome/common/chrome_version_info.h" |
| 82 #include "chrome/common/extensions/app_launcher_info.h" |
| 82 #include "chrome/common/extensions/background_info.h" | 83 #include "chrome/common/extensions/background_info.h" |
| 83 #include "chrome/common/extensions/extension.h" | 84 #include "chrome/common/extensions/extension.h" |
| 84 #include "chrome/common/extensions/extension_file_util.h" | 85 #include "chrome/common/extensions/extension_file_util.h" |
| 85 #include "chrome/common/extensions/extension_manifest_constants.h" | 86 #include "chrome/common/extensions/extension_manifest_constants.h" |
| 86 #include "chrome/common/extensions/extension_messages.h" | 87 #include "chrome/common/extensions/extension_messages.h" |
| 87 #include "chrome/common/extensions/extension_resource.h" | 88 #include "chrome/common/extensions/extension_resource.h" |
| 88 #include "chrome/common/extensions/feature_switch.h" | 89 #include "chrome/common/extensions/feature_switch.h" |
| 89 #include "chrome/common/extensions/features/feature.h" | 90 #include "chrome/common/extensions/features/feature.h" |
| 90 #include "chrome/common/extensions/manifest.h" | 91 #include "chrome/common/extensions/manifest.h" |
| 91 #include "chrome/common/extensions/manifest_url_handler.h" | 92 #include "chrome/common/extensions/manifest_url_handler.h" |
| (...skipping 735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 827 if (!Manifest::IsUnpackedLocation(extension->location())) { | 828 if (!Manifest::IsUnpackedLocation(extension->location())) { |
| 828 if (!GetFileTaskRunner()->PostTask( | 829 if (!GetFileTaskRunner()->PostTask( |
| 829 FROM_HERE, | 830 FROM_HERE, |
| 830 base::Bind( | 831 base::Bind( |
| 831 &extension_file_util::UninstallExtension, | 832 &extension_file_util::UninstallExtension, |
| 832 install_directory_, | 833 install_directory_, |
| 833 extension_id))) | 834 extension_id))) |
| 834 NOTREACHED(); | 835 NOTREACHED(); |
| 835 } | 836 } |
| 836 | 837 |
| 837 GURL launch_web_url_origin(extension->launch_web_url()); | 838 GURL launch_web_url_origin( |
| 839 extensions::AppLauncherInfo::GetLaunchWebURL(extension)); |
| 838 launch_web_url_origin = launch_web_url_origin.GetOrigin(); | 840 launch_web_url_origin = launch_web_url_origin.GetOrigin(); |
| 839 bool is_storage_isolated = extension->is_storage_isolated(); | 841 bool is_storage_isolated = extension->is_storage_isolated(); |
| 840 | 842 |
| 841 if (is_storage_isolated) { | 843 if (is_storage_isolated) { |
| 842 BrowserContext::AsyncObliterateStoragePartition( | 844 BrowserContext::AsyncObliterateStoragePartition( |
| 843 profile_, | 845 profile_, |
| 844 GetSiteForExtensionId(extension_id), | 846 GetSiteForExtensionId(extension_id), |
| 845 base::Bind(&ExtensionService::OnNeedsToGarbageCollectIsolatedStorage, | 847 base::Bind(&ExtensionService::OnNeedsToGarbageCollectIsolatedStorage, |
| 846 AsWeakPtr())); | 848 AsWeakPtr())); |
| 847 } else { | 849 } else { |
| (...skipping 2276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3124 if (!extension) | 3126 if (!extension) |
| 3125 continue; | 3127 continue; |
| 3126 blacklisted_extensions_.Insert(extension); | 3128 blacklisted_extensions_.Insert(extension); |
| 3127 UnloadExtension(*it, extension_misc::UNLOAD_REASON_BLACKLIST); | 3129 UnloadExtension(*it, extension_misc::UNLOAD_REASON_BLACKLIST); |
| 3128 UMA_HISTOGRAM_ENUMERATION("ExtensionBlacklist.BlacklistInstalled", | 3130 UMA_HISTOGRAM_ENUMERATION("ExtensionBlacklist.BlacklistInstalled", |
| 3129 extension->location(), Manifest::NUM_LOCATIONS); | 3131 extension->location(), Manifest::NUM_LOCATIONS); |
| 3130 } | 3132 } |
| 3131 | 3133 |
| 3132 IdentifyAlertableExtensions(); | 3134 IdentifyAlertableExtensions(); |
| 3133 } | 3135 } |
| OLD | NEW |