Index: chrome/browser/extensions/extension_service.h |
diff --git a/chrome/browser/extensions/extension_service.h b/chrome/browser/extensions/extension_service.h |
index 0a1ec62a405f8c548f0ad0361923e2da18ec3095..47932b4c3cdc121c0e05f5ea233311d1022da223 100644 |
--- a/chrome/browser/extensions/extension_service.h |
+++ b/chrome/browser/extensions/extension_service.h |
@@ -276,9 +276,14 @@ class ExtensionService |
// with extensions that exist. |external_uninstall| is a magical parameter |
// that is only used to send information to ExtensionPrefs, which external |
// callers should never set to true. |
+ // |
+ // We pass the |extension_id| by value to avoid having it deleted from under |
+ // us incase someone calls it with Extension::id() or another string that we |
+ // are going to delete in this function. |
+ // |
// TODO(aa): Remove |external_uninstall| -- this information should be passed |
// to ExtensionPrefs some other way. |
- virtual bool UninstallExtension(const std::string& extension_id, |
+ virtual bool UninstallExtension(std::string extension_id, |
bool external_uninstall, |
std::string* error); |