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

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

Issue 2181393002: Revert of Restrict use of two app-launching command line flags (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/unpacked_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/unpacked_installer.cc
diff --git a/chrome/browser/extensions/unpacked_installer.cc b/chrome/browser/extensions/unpacked_installer.cc
index 988293d951b887b6b6b1308bd7aaec09155e0c6f..f812a2f5f368e2391f6404ffb8128699c844337f 100644
--- a/chrome/browser/extensions/unpacked_installer.cc
+++ b/chrome/browser/extensions/unpacked_installer.cc
@@ -40,10 +40,6 @@
const char kUnpackedExtensionsBlacklistedError[] =
"Loading of unpacked extensions is disabled by the administrator.";
-const char kUnpackedExtensionInsteadOfAppError[] =
- "App loading flags cannot be used to load extensions. Please use "
- "--load-extension instead.";
-
const char kImportMinVersionNewer[] =
"'import' version requested is newer than what is installed.";
const char kImportMissing[] = "'import' extension is not installed.";
@@ -134,8 +130,7 @@
}
bool UnpackedInstaller::LoadFromCommandLine(const base::FilePath& path_in,
- std::string* extension_id,
- bool only_allow_apps) {
+ std::string* extension_id) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(extension_path_.empty());
@@ -156,16 +151,6 @@
install_checker_.set_extension(
file_util::LoadExtension(
extension_path_, Manifest::COMMAND_LINE, GetFlags(), &error).get());
-
- if (only_allow_apps && !extension()->is_platform_app()) {
-#if defined(GOOGLE_CHROME_BUILD)
- // Avoid crashing for users with hijacked shortcuts.
- return true;
-#else
- ReportExtensionLoadError(kUnpackedExtensionInsteadOfAppError);
- return false;
-#endif
- }
if (!extension() ||
!extension_l10n_util::ValidateExtensionLocales(
« no previous file with comments | « chrome/browser/extensions/unpacked_installer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698