summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions
diff options
context:
space:
mode:
authorkalman@chromium.org <kalman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-10 00:30:25 +0000
committerkalman@chromium.org <kalman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-10 00:30:25 +0000
commit3e873e5a0e9288abba9af8419ee29d8e8a708f73 (patch)
tree7fb8cb292326f691eb26a6f26dc9942f60a5133d /chrome/browser/extensions
parentb993705a0074ba28d880333d325c4e029a71a13b (diff)
downloadchromium_src-3e873e5a0e9288abba9af8419ee29d8e8a708f73.zip
chromium_src-3e873e5a0e9288abba9af8419ee29d8e8a708f73.tar.gz
chromium_src-3e873e5a0e9288abba9af8419ee29d8e8a708f73.tar.bz2
Replace UninstalledExtensionInfo with just a string for the extension id, all that's needed now.
BUG= TEST= Review URL: http://codereview.chromium.org/8165012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104687 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions')
-rw-r--r--chrome/browser/extensions/app_notification_manager.cc4
-rw-r--r--chrome/browser/extensions/app_notification_manager_unittest.cc10
-rw-r--r--chrome/browser/extensions/extension_management_api.cc5
-rw-r--r--chrome/browser/extensions/extension_service.cc4
4 files changed, 5 insertions, 18 deletions
diff --git a/chrome/browser/extensions/app_notification_manager.cc b/chrome/browser/extensions/app_notification_manager.cc
index 1b6d1d6..01a2bbc 100644
--- a/chrome/browser/extensions/app_notification_manager.cc
+++ b/chrome/browser/extensions/app_notification_manager.cc
@@ -101,9 +101,7 @@ void AppNotificationManager::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
CHECK(type == chrome::NOTIFICATION_EXTENSION_UNINSTALLED);
- const std::string& id =
- Details<UninstalledExtensionInfo>(details)->extension_id;
- ClearAll(id);
+ ClearAll(*Details<const std::string>(details).ptr());
}
void AppNotificationManager::LoadOnFileThread(const FilePath& storage_path) {
diff --git a/chrome/browser/extensions/app_notification_manager_unittest.cc b/chrome/browser/extensions/app_notification_manager_unittest.cc
index 683c442..55a567d 100644
--- a/chrome/browser/extensions/app_notification_manager_unittest.cc
+++ b/chrome/browser/extensions/app_notification_manager_unittest.cc
@@ -103,18 +103,10 @@ TEST_F(AppNotificationManagerTest, ExtensionUninstall) {
util::ExpectListsEqual(list2, *mgr_->GetAll(id2));
// Send the uninstall notification for extension id1.
- DictionaryValue dict;
- dict.SetString(extension_manifest_keys::kName, "Test Extension");
- dict.SetString(extension_manifest_keys::kVersion, "0.1");
- std::string error;
- scoped_refptr<Extension> extension = Extension::CreateWithId(
- temp_dir_.path().AppendASCII("dummy"), Extension::INTERNAL,
- dict, 0, id1, &error);
- UninstalledExtensionInfo info(*extension.get());
NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_UNINSTALLED,
Source<Profile>(profile_.get()),
- Details<UninstalledExtensionInfo>(&info));
+ Details<const std::string>(&id1));
// The id1 items should be gone but the id2 items should still be there.
EXPECT_EQ(NULL, mgr_->GetLast(id1));
diff --git a/chrome/browser/extensions/extension_management_api.cc b/chrome/browser/extensions/extension_management_api.cc
index 8bf02db..7db4f60 100644
--- a/chrome/browser/extensions/extension_management_api.cc
+++ b/chrome/browser/extensions/extension_management_api.cc
@@ -465,9 +465,8 @@ void ExtensionManagementEventRouter::Observe(
ListValue args;
if (event_name == events::kOnExtensionUninstalled) {
- const std::string& extension_id =
- Details<UninstalledExtensionInfo>(details).ptr()->extension_id;
- args.Append(Value::CreateStringValue(extension_id));
+ args.Append(
+ Value::CreateStringValue(*Details<const std::string>(details).ptr()));
} else {
const Extension* extension = NULL;
if (event_name == events::kOnExtensionDisabled) {
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index c6ad42e..11ce740 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -906,8 +906,6 @@ bool ExtensionService::UninstallExtension(
sync_change = extension_sync_data.GetSyncChange(SyncChange::ACTION_DELETE);
}
- UninstalledExtensionInfo uninstalled_extension_info(*extension);
-
UMA_HISTOGRAM_ENUMERATION("Extensions.UninstallType",
extension->GetType(), 100);
RecordPermissionMessagesHistogram(
@@ -956,7 +954,7 @@ bool ExtensionService::UninstallExtension(
NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_UNINSTALLED,
Source<Profile>(profile_),
- Details<UninstalledExtensionInfo>(&uninstalled_extension_info));
+ Details<const std::string>(&extension_id));
if (sync_bundle && sync_bundle->HasExtensionId(extension_id)) {
sync_bundle->sync_processor->ProcessSyncChanges(