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 6b0f7a1935d908cccb4d3bb4a43ffa456a1da8e8..9694e4a18663a5440b1b3f835488a3294788d1e4 100644 |
--- a/chrome/browser/chromeos/file_manager/file_tasks.cc |
+++ b/chrome/browser/chromeos/file_manager/file_tasks.cc |
@@ -6,7 +6,6 @@ |
#include "apps/launcher.h" |
#include "base/bind.h" |
-#include "base/command_line.h" |
#include "base/prefs/pref_service.h" |
#include "base/prefs/scoped_user_pref_update.h" |
#include "base/strings/stringprintf.h" |
@@ -26,7 +25,6 @@ |
#include "chrome/common/extensions/api/file_browser_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" |
@@ -105,28 +103,6 @@ void KeepOnlyFileManagerInternalTasks(std::vector<FullTaskDescriptor>* tasks) { |
tasks->swap(filtered); |
} |
-void ChooseSuitableGalleryHandler(std::vector<FullTaskDescriptor>* task_list) { |
- const bool disable_new_gallery = |
- base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
- chromeos::switches::kFileManagerEnableNewGallery) == "false"; |
- std::vector<FullTaskDescriptor>::iterator it = task_list->begin(); |
- while (it != task_list->end()) { |
- if (disable_new_gallery) { |
- if (it->task_descriptor().app_id == kGalleryAppId) |
- it = task_list->erase(it); |
- else |
- ++it; |
- } else { |
- if (it->task_descriptor().app_id == kFileManagerAppId && |
- it->task_descriptor().action_id == "gallery") { |
- it = task_list->erase(it); |
- } else { |
- ++it; |
- } |
- } |
- } |
-} |
- |
// Returns true if the given task is a handler by built-in apps like Files.app |
// itself or QuickOffice etc. They are used as the initial default app. |
bool IsFallbackFileHandler(const file_tasks::TaskDescriptor& task) { |
@@ -504,7 +480,6 @@ void FindAllTypesOfTasks( |
if (ContainsGoogleDocument(path_mime_set)) |
KeepOnlyFileManagerInternalTasks(result_list); |
- ChooseSuitableGalleryHandler(result_list); |
ChooseAndSetDefaultTask(*profile->GetPrefs(), path_mime_set, result_list); |
} |