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

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

Issue 2783813002: Move ChromeRequirementsChecker to //extensions as a PreloadCheck (Closed)
Patch Set: rebase? Created 3 years, 8 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/requirements_checker_browsertest.cc ('k') | chrome/common/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/unpacked_installer.cc
diff --git a/chrome/browser/extensions/unpacked_installer.cc b/chrome/browser/extensions/unpacked_installer.cc
index 148113f36b5a782b3695c9501369db66452e438c..0d93fcc26aac63d036ee7d61efc674f41ebf79be 100644
--- a/chrome/browser/extensions/unpacked_installer.cc
+++ b/chrome/browser/extensions/unpacked_installer.cc
@@ -8,7 +8,9 @@
#include "base/callback.h"
#include "base/files/file_util.h"
#include "base/memory/ptr_util.h"
+#include "base/strings/string16.h"
#include "base/strings/string_util.h"
+#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread_restrictions.h"
#include "chrome/browser/extensions/extension_error_reporter.h"
#include "chrome/browser/extensions/extension_install_checker.h"
@@ -18,7 +20,6 @@
#include "chrome/browser/extensions/permissions_updater.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/extensions/extension_install_ui_factory.h"
-#include "chrome/common/extensions/api/plugins/plugins_handler.h"
#include "components/crx_file/id_util.h"
#include "components/sync/model/string_ordinal.h"
#include "content/public/browser/browser_thread.h"
@@ -30,6 +31,7 @@
#include "extensions/common/extension_l10n_util.h"
#include "extensions/common/file_util.h"
#include "extensions/common/manifest.h"
+#include "extensions/common/manifest_handlers/plugins_handler.h"
#include "extensions/common/manifest_handlers/shared_module_info.h"
#include "extensions/common/permissions/permissions_data.h"
@@ -253,14 +255,12 @@ void UnpackedInstaller::StartInstallChecks() {
void UnpackedInstaller::OnInstallChecksComplete(int failed_checks) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
- if (!install_checker_->policy_error().empty()) {
- ReportExtensionLoadError(install_checker_->policy_error());
- return;
- }
+ base::string16 error_message = install_checker_->policy_error();
+ if (error_message.empty())
+ error_message = install_checker_->requirements_error_message();
- if (!install_checker_->requirement_errors().empty()) {
- ReportExtensionLoadError(
- base::JoinString(install_checker_->requirement_errors(), " "));
+ if (!error_message.empty()) {
+ ReportExtensionLoadError(base::UTF16ToUTF8(error_message));
return;
}
« no previous file with comments | « chrome/browser/extensions/requirements_checker_browsertest.cc ('k') | chrome/common/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698