summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_prefs.cc
diff options
context:
space:
mode:
authoraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-04 23:48:34 +0000
committeraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-04 23:48:34 +0000
commit1952c7d55e5f3cb5d7d75eeab965af32459d2b31 (patch)
treecc32dc77802bbd5b87031a7edb54c936f602d2da /chrome/browser/extensions/extension_prefs.cc
parent495839a63f9516e20abbf0ab2258aa5d7dfa7180 (diff)
downloadchromium_src-1952c7d55e5f3cb5d7d75eeab965af32459d2b31.zip
chromium_src-1952c7d55e5f3cb5d7d75eeab965af32459d2b31.tar.gz
chromium_src-1952c7d55e5f3cb5d7d75eeab965af32459d2b31.tar.bz2
Load the bookmark manager extension at Chrome startup.
Review URL: http://codereview.chromium.org/660232 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40683 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_prefs.cc')
-rw-r--r--chrome/browser/extensions/extension_prefs.cc14
1 files changed, 11 insertions, 3 deletions
diff --git a/chrome/browser/extensions/extension_prefs.cc b/chrome/browser/extensions/extension_prefs.cc
index 3aeda24..388172d 100644
--- a/chrome/browser/extensions/extension_prefs.cc
+++ b/chrome/browser/extensions/extension_prefs.cc
@@ -538,15 +538,23 @@ ExtensionPrefs::ExtensionsInfo* ExtensionPrefs::CollectExtensionsInfo(
NOTREACHED();
continue;
}
+
+ // Only internal and external extensions can be installed permanently in the
+ // preferences.
+ Extension::Location location =
+ static_cast<Extension::Location>(location_value);
+ if (location != Extension::INTERNAL &&
+ !Extension::IsExternalLocation(location)) {
+ NOTREACHED();
+ continue;
+ }
+
DictionaryValue* manifest = NULL;
if (!ext->GetDictionary(kPrefManifest, &manifest)) {
LOG(WARNING) << "Missing manifest for extension " << *extension_id;
// Just a warning for now.
}
- Extension::Location location =
- static_cast<Extension::Location>(location_value);
-
extensions_info->push_back(linked_ptr<ExtensionInfo>(new ExtensionInfo(
manifest, WideToASCII(*extension_id), FilePath(path), location)));
}