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

Unified Diff: chrome/browser/chromeos/file_manager/file_tasks.cc

Issue 692793002: [unpacker] Allow only one ZIP handler at once: either the new or the old one. (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 | « chrome/browser/chromeos/file_manager/file_browser_handlers.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/file_manager/file_tasks.cc
diff --git a/chrome/browser/chromeos/file_manager/file_tasks.cc b/chrome/browser/chromeos/file_manager/file_tasks.cc
index 238a29eee0f59909d9e97c557d354d8497e98ef5..518737220049b83271ac7a355b99a3fdb226bb84 100644
--- a/chrome/browser/chromeos/file_manager/file_tasks.cc
+++ b/chrome/browser/chromeos/file_manager/file_tasks.cc
@@ -26,6 +26,7 @@
#include "chrome/common/extensions/api/file_manager_private.h"
#include "chrome/common/extensions/extension_constants.h"
#include "chrome/common/pref_names.h"
+#include "chromeos/chromeos_switches.h"
#include "extensions/browser/extension_host.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/extension_system.h"
@@ -391,6 +392,14 @@ void FindFileHandlerTasks(
if (file_handlers.empty())
continue;
+ // If the new ZIP unpacker is disabled, then hide its handlers, so we don't
+ // show both the legacy one and the new one in Files app for ZIP files.
+ if (extension->id() == extension_misc::kZIPUnpackerExtensionId &&
+ CommandLine::ForCurrentProcess()->HasSwitch(
+ chromeos::switches::kDisableNewZIPUnpacker)) {
+ continue;
+ }
+
// Only show the first matching handler from each app.
const extensions::FileHandlerInfo* file_handler = file_handlers.front();
std::string task_id = file_tasks::MakeTaskID(
« no previous file with comments | « chrome/browser/chromeos/file_manager/file_browser_handlers.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698