diff options
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/extensions/extension_service.cc | 2 | ||||
-rw-r--r-- | chrome/browser/extensions/extension_service_unittest.cc | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc index 60a864f..bf77408 100644 --- a/chrome/browser/extensions/extension_service.cc +++ b/chrome/browser/extensions/extension_service.cc @@ -804,6 +804,8 @@ bool ExtensionService::UpdateExtension( installer->set_install_source(extension->location()); if (pending_extension_info.install_silently()) installer->set_allow_silent_install(true); + if (extension && extension->from_webstore()) + installer->set_is_gallery_install(true); installer->set_delete_source(true); installer->set_original_url(download_url); installer->set_install_cause(extension_misc::INSTALL_CAUSE_UPDATE); diff --git a/chrome/browser/extensions/extension_service_unittest.cc b/chrome/browser/extensions/extension_service_unittest.cc index 83bafa1..51931de 100644 --- a/chrome/browser/extensions/extension_service_unittest.cc +++ b/chrome/browser/extensions/extension_service_unittest.cc @@ -1958,6 +1958,12 @@ TEST_F(ExtensionServiceTest, FromWebStore) { service_->ReloadExtensions(); extension = service_->extensions()->at(0); ASSERT_TRUE(extension->from_webstore()); + + // Upgrade to version 2.0 + path = data_dir_.AppendASCII("good2.crx"); + UpdateExtension(good_crx, path, ENABLED); + ValidatePrefKeyCount(1); + ValidateBooleanPref(good_crx, "from_webstore", true); } // Test upgrading a signed extension. |