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

Unified Diff: chrome/browser/ui/webui/extensions/extension_loader_handler.cc

Issue 676503003: Exclude zip-file loading from "Load Unpacked Extension" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/extensions/extension_loader_handler.cc
diff --git a/chrome/browser/ui/webui/extensions/extension_loader_handler.cc b/chrome/browser/ui/webui/extensions/extension_loader_handler.cc
index 6dc631b4067423be87770334b91444b296a72886..bf47de246f8be327b89911bc87f8832bb9da1387 100644
--- a/chrome/browser/ui/webui/extensions/extension_loader_handler.cc
+++ b/chrome/browser/ui/webui/extensions/extension_loader_handler.cc
@@ -219,27 +219,14 @@ void ExtensionLoaderHandler::HandleDisplayFailures(
void ExtensionLoaderHandler::LoadUnpackedExtensionImpl(
const base::FilePath& file_path) {
- if (EndsWith(file_path.AsUTF16Unsafe(),
- base::ASCIIToUTF16(".zip"),
- false /* case insensitive */)) {
- scoped_refptr<ZipFileInstaller> installer = ZipFileInstaller::Create(
- ExtensionSystem::Get(profile_)->extension_service());
-
- // We do our own error handling, so we don't want a load failure to trigger
- // a dialog.
- installer->set_be_noisy_on_failure(false);
-
- installer->LoadFromZipFile(file_path);
- } else {
- scoped_refptr<UnpackedInstaller> installer = UnpackedInstaller::Create(
- ExtensionSystem::Get(profile_)->extension_service());
-
- // We do our own error handling, so we don't want a load failure to trigger
- // a dialog.
- installer->set_be_noisy_on_failure(false);
-
- installer->Load(file_path);
- }
+ scoped_refptr<UnpackedInstaller> installer = UnpackedInstaller::Create(
+ ExtensionSystem::Get(profile_)->extension_service());
+
+ // We do our own error handling, so we don't want a load failure to trigger
+ // a dialog.
+ installer->set_be_noisy_on_failure(false);
+
+ installer->Load(file_path);
}
void ExtensionLoaderHandler::OnLoadFailure(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698