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

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

Issue 164151: Fix "crashed extension" infobar browser crashes.... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: sync with trunk Created 11 years, 4 months 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_prefs.h ('k') | chrome/browser/extensions/extensions_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_prefs.cc
diff --git a/chrome/browser/extensions/extension_prefs.cc b/chrome/browser/extensions/extension_prefs.cc
index 458394450db7dffdefde16ac39aa1ef015ea1024..d6388471fdc77dc7a0036c6d0287632a0a855592 100644
--- a/chrome/browser/extensions/extension_prefs.cc
+++ b/chrome/browser/extensions/extension_prefs.cc
@@ -389,6 +389,18 @@ void ExtensionPrefs::MigrateToPrefs(Extension* extension) {
extension->manifest_value()->DeepCopy());
}
+FilePath ExtensionPrefs::GetExtensionPath(const std::string& extension_id) {
+ const DictionaryValue* dict = prefs_->GetDictionary(kExtensionsPref);
+ if (!dict || dict->GetSize() == 0)
+ return FilePath();
+
+ std::wstring path;
+ if (!dict->GetString(ASCIIToWide(extension_id) + L"." + kPrefPath, &path))
+ return FilePath();
+
+ return install_directory_.Append(FilePath::FromWStringHack(path));
+}
+
bool ExtensionPrefs::UpdateExtensionPref(const std::string& extension_id,
const std::wstring& key,
Value* data_value) {
« no previous file with comments | « chrome/browser/extensions/extension_prefs.h ('k') | chrome/browser/extensions/extensions_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698