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

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

Issue 1409393009: Skip extension management policy checks when installing a bookmark app. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bookmark-app-crash-fix
Patch Set: Created 5 years, 2 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/crx_installer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/crx_installer.cc
diff --git a/chrome/browser/extensions/crx_installer.cc b/chrome/browser/extensions/crx_installer.cc
index 898c814ad7aa33c93d1b9030073ef31e9c686758..0506b8f87c883a376f325952447535d109aa3bc7 100644
--- a/chrome/browser/extensions/crx_installer.cc
+++ b/chrome/browser/extensions/crx_installer.cc
@@ -309,12 +309,15 @@ CrxInstallError CrxInstaller::AllowInstall(const Extension* extension) {
l10n_util::GetStringUTF16(IDS_EXTENSION_MANIFEST_INVALID));
}
- // The checks below are skipped for themes and external installs.
+ // The checks below are skipped for themes, external installs, and bookmark
+ // apps.
// TODO(pamg): After ManagementPolicy refactoring is complete, remove this
// and other uses of install_source_ that are no longer needed now that the
// SandboxedUnpacker sets extension->location.
- if (extension->is_theme() || Manifest::IsExternalLocation(install_source_))
+ if (extension->is_theme() || extension->from_bookmark() ||
+ Manifest::IsExternalLocation(install_source_)) {
return CrxInstallError();
+ }
if (!extensions_enabled_) {
return CrxInstallError(
@@ -509,11 +512,16 @@ void CrxInstaller::CheckInstall() {
}
}
- // Run the policy, requirements and blacklist checks in parallel.
- install_checker_.Start(
- ExtensionInstallChecker::CHECK_ALL,
- false /* fail fast */,
- base::Bind(&CrxInstaller::OnInstallChecksComplete, this));
+ // Run the policy, requirements and blacklist checks in parallel. Skip the
+ // checks if the extension is a bookmark app.
benwells 2015/10/30 02:24:13 Why is this skipped for bookmark apps but not for
dominickn 2015/10/30 02:42:30 I'm not sure. The log indicates that the theme exe
+ if (extension()->from_bookmark()) {
+ CrxInstaller::OnInstallChecksComplete(0);
+ } else {
+ install_checker_.Start(
+ ExtensionInstallChecker::CHECK_ALL,
+ false /* fail fast */,
+ base::Bind(&CrxInstaller::OnInstallChecksComplete, this));
+ }
}
void CrxInstaller::OnInstallChecksComplete(int failed_checks) {
« no previous file with comments | « chrome/browser/extensions/crx_installer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698