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

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

Issue 491223002: Gallery.app: Remove old gallery from Files.app. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove filePopup_ related code. Created 6 years, 4 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/about_flags.cc ('k') | chromeos/chromeos_switches.h » ('j') | 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 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);
}
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chromeos/chromeos_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698