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

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

Issue 11275069: Perform install tasks for newly installed or upgraded component apps/extensions. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase and move v2 component app added in r169911 (and r170087) into background section in componen… Created 8 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
Index: chrome/browser/extensions/extension_prefs.cc
diff --git a/chrome/browser/extensions/extension_prefs.cc b/chrome/browser/extensions/extension_prefs.cc
index a26f3ad4cd0992ead9258af17b7c3360f6b8181a..83fbb596830c553f4484409b4fe0ea96fe13c33d 100644
--- a/chrome/browser/extensions/extension_prefs.cc
+++ b/chrome/browser/extensions/extension_prefs.cc
@@ -1653,11 +1653,12 @@ scoped_ptr<ExtensionInfo> ExtensionPrefs::GetInstalledExtensionInfo(
if (IsBlacklistBitSet(ext))
return scoped_ptr<ExtensionInfo>();
int state_value;
- if (!ext->GetInteger(kPrefState, &state_value)) {
- // This can legitimately happen if we store preferences for component
- // extensions.
+ if (!ext->GetInteger(kPrefState, &state_value) ||
+ state_value == Extension::ENABLED_COMPONENT) {
+ // Old preferences files may not have kPrefState for component extensions.
return scoped_ptr<ExtensionInfo>();
}
+
if (state_value == Extension::EXTERNAL_EXTENSION_UNINSTALLED) {
LOG(WARNING) << "External extension with id " << extension_id
<< " has been uninstalled by the user";
« no previous file with comments | « chrome/browser/extensions/component_loader_unittest.cc ('k') | chrome/browser/extensions/extension_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698