| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 #include "chrome/browser/themes/theme_service_factory.h" | 71 #include "chrome/browser/themes/theme_service_factory.h" |
| 72 #include "chrome/browser/ui/webui/favicon_source.h" | 72 #include "chrome/browser/ui/webui/favicon_source.h" |
| 73 #include "chrome/browser/ui/webui/ntp/thumbnail_source.h" | 73 #include "chrome/browser/ui/webui/ntp/thumbnail_source.h" |
| 74 #include "chrome/browser/ui/webui/theme_source.h" | 74 #include "chrome/browser/ui/webui/theme_source.h" |
| 75 #include "chrome/common/child_process_logging.h" | 75 #include "chrome/common/child_process_logging.h" |
| 76 #include "chrome/common/chrome_notification_types.h" | 76 #include "chrome/common/chrome_notification_types.h" |
| 77 #include "chrome/common/chrome_paths.h" | 77 #include "chrome/common/chrome_paths.h" |
| 78 #include "chrome/common/chrome_switches.h" | 78 #include "chrome/common/chrome_switches.h" |
| 79 #include "chrome/common/chrome_version_info.h" | 79 #include "chrome/common/chrome_version_info.h" |
| 80 #include "chrome/common/extensions/api/plugins/plugins_handler.h" | 80 #include "chrome/common/extensions/api/plugins/plugins_handler.h" |
| 81 #include "chrome/common/extensions/app_launcher_info.h" |
| 81 #include "chrome/common/extensions/background_info.h" | 82 #include "chrome/common/extensions/background_info.h" |
| 82 #include "chrome/common/extensions/extension.h" | 83 #include "chrome/common/extensions/extension.h" |
| 83 #include "chrome/common/extensions/extension_file_util.h" | 84 #include "chrome/common/extensions/extension_file_util.h" |
| 84 #include "chrome/common/extensions/extension_manifest_constants.h" | 85 #include "chrome/common/extensions/extension_manifest_constants.h" |
| 85 #include "chrome/common/extensions/extension_messages.h" | 86 #include "chrome/common/extensions/extension_messages.h" |
| 86 #include "chrome/common/extensions/extension_resource.h" | 87 #include "chrome/common/extensions/extension_resource.h" |
| 87 #include "chrome/common/extensions/feature_switch.h" | 88 #include "chrome/common/extensions/feature_switch.h" |
| 88 #include "chrome/common/extensions/features/feature.h" | 89 #include "chrome/common/extensions/features/feature.h" |
| 89 #include "chrome/common/extensions/manifest.h" | 90 #include "chrome/common/extensions/manifest.h" |
| 90 #include "chrome/common/extensions/manifest_url_handler.h" | 91 #include "chrome/common/extensions/manifest_url_handler.h" |
| (...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 832 if (!Manifest::IsUnpackedLocation(extension->location())) { | 833 if (!Manifest::IsUnpackedLocation(extension->location())) { |
| 833 if (!GetFileTaskRunner()->PostTask( | 834 if (!GetFileTaskRunner()->PostTask( |
| 834 FROM_HERE, | 835 FROM_HERE, |
| 835 base::Bind( | 836 base::Bind( |
| 836 &extension_file_util::UninstallExtension, | 837 &extension_file_util::UninstallExtension, |
| 837 install_directory_, | 838 install_directory_, |
| 838 extension_id))) | 839 extension_id))) |
| 839 NOTREACHED(); | 840 NOTREACHED(); |
| 840 } | 841 } |
| 841 | 842 |
| 842 GURL launch_web_url_origin(extension->launch_web_url()); | 843 GURL launch_web_url_origin( |
| 844 extensions::AppLauncherInfo::GetLaunchWebURL(extension)); |
| 843 launch_web_url_origin = launch_web_url_origin.GetOrigin(); | 845 launch_web_url_origin = launch_web_url_origin.GetOrigin(); |
| 844 bool is_storage_isolated = extension->is_storage_isolated(); | 846 bool is_storage_isolated = extension->is_storage_isolated(); |
| 845 | 847 |
| 846 if (is_storage_isolated) { | 848 if (is_storage_isolated) { |
| 847 BrowserContext::AsyncObliterateStoragePartition( | 849 BrowserContext::AsyncObliterateStoragePartition( |
| 848 profile_, | 850 profile_, |
| 849 GetSiteForExtensionId(extension_id), | 851 GetSiteForExtensionId(extension_id), |
| 850 base::Bind(&ExtensionService::OnNeedsToGarbageCollectIsolatedStorage, | 852 base::Bind(&ExtensionService::OnNeedsToGarbageCollectIsolatedStorage, |
| 851 AsWeakPtr())); | 853 AsWeakPtr())); |
| 852 } else { | 854 } else { |
| (...skipping 2269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3122 } | 3124 } |
| 3123 | 3125 |
| 3124 void ExtensionService::AddUpdateObserver(extensions::UpdateObserver* observer) { | 3126 void ExtensionService::AddUpdateObserver(extensions::UpdateObserver* observer) { |
| 3125 update_observers_.AddObserver(observer); | 3127 update_observers_.AddObserver(observer); |
| 3126 } | 3128 } |
| 3127 | 3129 |
| 3128 void ExtensionService::RemoveUpdateObserver( | 3130 void ExtensionService::RemoveUpdateObserver( |
| 3129 extensions::UpdateObserver* observer) { | 3131 extensions::UpdateObserver* observer) { |
| 3130 update_observers_.RemoveObserver(observer); | 3132 update_observers_.RemoveObserver(observer); |
| 3131 } | 3133 } |
| OLD | NEW |