| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 #include "chrome/common/extensions/extension_l10n_util.h" | 71 #include "chrome/common/extensions/extension_l10n_util.h" |
| 72 #include "chrome/common/extensions/extension_messages.h" | 72 #include "chrome/common/extensions/extension_messages.h" |
| 73 #include "chrome/common/extensions/extension_resource.h" | 73 #include "chrome/common/extensions/extension_resource.h" |
| 74 #include "chrome/common/pref_names.h" | 74 #include "chrome/common/pref_names.h" |
| 75 #include "chrome/common/url_constants.h" | 75 #include "chrome/common/url_constants.h" |
| 76 #include "content/browser/browser_thread.h" | 76 #include "content/browser/browser_thread.h" |
| 77 #include "content/browser/debugger/devtools_manager.h" | 77 #include "content/browser/debugger/devtools_manager.h" |
| 78 #include "content/browser/plugin_process_host.h" | 78 #include "content/browser/plugin_process_host.h" |
| 79 #include "content/browser/plugin_service.h" | 79 #include "content/browser/plugin_service.h" |
| 80 #include "content/browser/renderer_host/render_process_host.h" | 80 #include "content/browser/renderer_host/render_process_host.h" |
| 81 #include "content/browser/user_metrics.h" |
| 81 #include "content/common/content_notification_types.h" | 82 #include "content/common/content_notification_types.h" |
| 82 #include "content/common/json_value_serializer.h" | 83 #include "content/common/json_value_serializer.h" |
| 83 #include "content/common/notification_service.h" | 84 #include "content/common/notification_service.h" |
| 84 #include "content/common/pepper_plugin_registry.h" | 85 #include "content/common/pepper_plugin_registry.h" |
| 85 #include "googleurl/src/gurl.h" | 86 #include "googleurl/src/gurl.h" |
| 86 #include "net/base/registry_controlled_domain.h" | 87 #include "net/base/registry_controlled_domain.h" |
| 87 #include "webkit/database/database_tracker.h" | 88 #include "webkit/database/database_tracker.h" |
| 88 #include "webkit/database/database_util.h" | 89 #include "webkit/database/database_util.h" |
| 89 #include "webkit/plugins/npapi/plugin_list.h" | 90 #include "webkit/plugins/npapi/plugin_list.h" |
| 90 | 91 |
| (...skipping 858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 949 chrome::NOTIFICATION_EXTENSION_UNINSTALLED, | 950 chrome::NOTIFICATION_EXTENSION_UNINSTALLED, |
| 950 Source<Profile>(profile_), | 951 Source<Profile>(profile_), |
| 951 Details<UninstalledExtensionInfo>(&uninstalled_extension_info)); | 952 Details<UninstalledExtensionInfo>(&uninstalled_extension_info)); |
| 952 | 953 |
| 953 if (sync_bundle && sync_bundle->HasExtensionId(extension_id)) { | 954 if (sync_bundle && sync_bundle->HasExtensionId(extension_id)) { |
| 954 sync_bundle->sync_processor->ProcessSyncChanges( | 955 sync_bundle->sync_processor->ProcessSyncChanges( |
| 955 FROM_HERE, SyncChangeList(1, sync_change)); | 956 FROM_HERE, SyncChangeList(1, sync_change)); |
| 956 sync_bundle->synced_extensions.erase(extension_id); | 957 sync_bundle->synced_extensions.erase(extension_id); |
| 957 } | 958 } |
| 958 | 959 |
| 960 // Track the uninstallation. |
| 961 UserMetrics::RecordAction( |
| 962 UserMetricsAction("Extensions.ExtensionUninstalled")); |
| 963 |
| 959 return true; | 964 return true; |
| 960 } | 965 } |
| 961 | 966 |
| 962 void ExtensionService::ClearExtensionData(const std::string& extension_id, | 967 void ExtensionService::ClearExtensionData(const std::string& extension_id, |
| 963 const GURL& storage_url, | 968 const GURL& storage_url, |
| 964 bool is_storage_isolated) { | 969 bool is_storage_isolated) { |
| 965 scoped_refptr<ExtensionDataDeleter> deleter(new ExtensionDataDeleter( | 970 scoped_refptr<ExtensionDataDeleter> deleter(new ExtensionDataDeleter( |
| 966 profile_, extension_id, storage_url, is_storage_isolated)); | 971 profile_, extension_id, storage_url, is_storage_isolated)); |
| 967 deleter->StartDeleting(); | 972 deleter->StartDeleting(); |
| 968 } | 973 } |
| (...skipping 1902 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2871 | 2876 |
| 2872 ExtensionService::NaClModuleInfoList::iterator | 2877 ExtensionService::NaClModuleInfoList::iterator |
| 2873 ExtensionService::FindNaClModule(const GURL& url) { | 2878 ExtensionService::FindNaClModule(const GURL& url) { |
| 2874 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin(); | 2879 for (NaClModuleInfoList::iterator iter = nacl_module_list_.begin(); |
| 2875 iter != nacl_module_list_.end(); ++iter) { | 2880 iter != nacl_module_list_.end(); ++iter) { |
| 2876 if (iter->url == url) | 2881 if (iter->url == url) |
| 2877 return iter; | 2882 return iter; |
| 2878 } | 2883 } |
| 2879 return nacl_module_list_.end(); | 2884 return nacl_module_list_.end(); |
| 2880 } | 2885 } |
| OLD | NEW |