diff options
author | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-25 17:53:15 +0000 |
---|---|---|
committer | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-25 17:53:15 +0000 |
commit | 27b985db86e682c821f13ec37b52a6c69aa69fbb (patch) | |
tree | af9ed515ccc19ea7b9682afbe6de7d982e12d4c8 /chrome/browser/extensions/extension_prefs.cc | |
parent | 8380c0910bfff5ee0af6b37536cd815023d055ef (diff) | |
download | chromium_src-27b985db86e682c821f13ec37b52a6c69aa69fbb.zip chromium_src-27b985db86e682c821f13ec37b52a6c69aa69fbb.tar.gz chromium_src-27b985db86e682c821f13ec37b52a6c69aa69fbb.tar.bz2 |
The Provider for External Extensions no longer uses
the prefs file, but instead reads a preferences file
(a json file called external_extensions.json).
This file specifies what external extensions we
installed (shipped with Chrome) and the extension
system takes care of installing them.
Having this in a separate file makes the upgrade
scenario easier, since we can during upgrade simply
blow away this file and replace it (and not have
to worry about merging/loosing user specified data).
The extension system will read the file, and figure
out whether any extension needs to be upgraded based
on the information provided.
Now, all external providers fetch data on the file
thread instead of reading and copying preferences on
the UI thread and posting them to the file thread.
BUG=http://crbug.com/14201
TEST=Covered by unit test.
Review URL: http://codereview.chromium.org/144018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19264 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_prefs.cc')
-rw-r--r-- | chrome/browser/extensions/extension_prefs.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/chrome/browser/extensions/extension_prefs.cc b/chrome/browser/extensions/extension_prefs.cc index 50618b5..32d6fd5 100644 --- a/chrome/browser/extensions/extension_prefs.cc +++ b/chrome/browser/extensions/extension_prefs.cc @@ -149,10 +149,14 @@ void ExtensionPrefs::OnExtensionInstalled(Extension* extension) { prefs_->ScheduleSavePersistentPrefs(); } -void ExtensionPrefs::OnExtensionUninstalled(const Extension* extension) { +void ExtensionPrefs::OnExtensionUninstalled(const Extension* extension, + bool external_uninstall) { // For external extensions, we save a preference reminding ourself not to try - // and install the extension anymore. - if (Extension::IsExternalLocation(extension->location())) { + // and install the extension anymore (except when |external_uninstall| is + // true, which signifies that the registry key was deleted or the pref file + // no longer lists the extension). + if (!external_uninstall && + Extension::IsExternalLocation(extension->location())) { UpdateExtensionPref(extension->id(), kPrefState, Value::CreateIntegerValue(Extension::KILLBIT)); prefs_->ScheduleSavePersistentPrefs(); |