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

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

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 | « no previous file | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698