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

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

Issue 210623003: [VideoPlayer] Remove the old video player from Files.app (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adressed the comments Created 6 years, 9 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
Index: chrome/browser/chromeos/file_manager/file_browser_handlers.cc
diff --git a/chrome/browser/chromeos/file_manager/file_browser_handlers.cc b/chrome/browser/chromeos/file_manager/file_browser_handlers.cc
index aa1ef26c80a4772b29dd78d58a47e3c2f65f213f..128e2bc4f7c051fbcd7c0fd00912b1b416070d12 100644
--- a/chrome/browser/chromeos/file_manager/file_browser_handlers.cc
+++ b/chrome/browser/chromeos/file_manager/file_browser_handlers.cc
@@ -133,25 +133,6 @@ FileBrowserHandlerList FindFileBrowserHandlersForURL(
return results;
}
-// Finds a file browser handler that matches |extension_id| and |action_id|
-// from |handler_list|. Returns a mutable iterator to the handler if
-// found. Returns handler_list->end() if not found.
-FileBrowserHandlerList::iterator
-FindFileBrowserHandlerForExtensionIdAndActionId(
- FileBrowserHandlerList* handler_list,
- const std::string& extension_id,
- const std::string& action_id) {
- DCHECK(handler_list);
-
- FileBrowserHandlerList::iterator iter = handler_list->begin();
- while (iter != handler_list->end() &&
- !((*iter)->extension_id() == extension_id &&
- (*iter)->id() == action_id)) {
- ++iter;
- }
- return iter;
-}
-
// This class is used to execute a file browser handler task. Here's how this
// works:
//
@@ -544,25 +525,6 @@ FileBrowserHandlerList FindFileBrowserHandlers(
}
}
- // "watch" and "gallery" are defined in the file manager's manifest.json.
- FileBrowserHandlerList::iterator watch_iter =
- FindFileBrowserHandlerForExtensionIdAndActionId(
- &common_handlers, kFileManagerAppId, "watch");
- FileBrowserHandlerList::iterator gallery_iter =
- FindFileBrowserHandlerForExtensionIdAndActionId(
- &common_handlers, kFileManagerAppId, "gallery");
- if (watch_iter != common_handlers.end() &&
- gallery_iter != common_handlers.end()) {
- // Both "watch" and "gallery" actions are applicable which means that the
- // selection is all videos. Showing them both is confusing, so we only keep
- // the one that makes more sense ("watch" for single selection, "gallery"
- // for multiple selection).
- if (file_list.size() == 1)
- common_handlers.erase(gallery_iter);
- else
- common_handlers.erase(watch_iter);
- }
-
return common_handlers;
}

Powered by Google App Engine
This is Rietveld 408576698