Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6322)

Unified Diff: chrome/browser/extensions/extension_service.cc

Issue 8537029: Simple cleanup to avoid needing to worry about having a reference to a deleted string. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/extension_service.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_service.cc
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index 2499bd4082c69a2e12e81de210a77d276acc9b2b..712e8630449d104d4a4f71f3abdb2d30ed811d05 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -627,16 +627,11 @@ void ExtensionService::ReloadExtension(const std::string& extension_id) {
}
bool ExtensionService::UninstallExtension(
- const std::string& extension_id_unsafe,
+ std::string extension_id,
bool external_uninstall,
std::string* error) {
CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- // Copy the extension identifier since the reference might have been
- // obtained via Extension::id() and the extension may be deleted in
- // this function.
- std::string extension_id(extension_id_unsafe);
-
scoped_refptr<const Extension> extension(GetInstalledExtension(extension_id));
// Callers should not send us nonexistent extensions.
« no previous file with comments | « chrome/browser/extensions/extension_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698