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

Unified Diff: chrome/browser/chromeos/extensions/file_manager/file_handler_util.h

Issue 15975004: Replace sets with vectors when storing file handlers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 years, 7 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/extensions/file_manager/file_handler_util.h
diff --git a/chrome/browser/chromeos/extensions/file_manager/file_handler_util.h b/chrome/browser/chromeos/extensions/file_manager/file_handler_util.h
index dbab0833da15dea3792ae137525de4e494199798..beb0a3f9bdc3bfabfe9fdf063f9b79f0d5710d0e 100644
--- a/chrome/browser/chromeos/extensions/file_manager/file_handler_util.h
+++ b/chrome/browser/chromeos/extensions/file_manager/file_handler_util.h
@@ -28,6 +28,9 @@ class FileSystemURL;
namespace file_handler_util {
+// Tasks are stored as a vector in order of priorities.
+typedef std::vector<const FileBrowserHandler*> FileBrowserHandlerList;
+
// Specifies the task type for a task id that represents some file action, Drive
// action, or Web Intent action.
extern const char kTaskFile[];
@@ -74,13 +77,13 @@ bool CrackTaskID(const std::string& task_id,
// prefs) from the |common_tasks|.
void FindDefaultTasks(Profile* profile,
const std::vector<base::FilePath>& files_list,
- const std::set<const FileBrowserHandler*>& common_tasks,
- std::set<const FileBrowserHandler*>* default_tasks);
+ const FileBrowserHandlerList& common_tasks,
+ FileBrowserHandlerList* default_tasks);
// This generates list of tasks common for all files in |file_list|.
bool FindCommonTasks(Profile* profile,
const std::vector<GURL>& files_list,
- std::set<const FileBrowserHandler*>* common_tasks);
+ FileBrowserHandlerList* common_tasks);
// Finds a task for a file whose URL is |url| and whose path is |path|.
// Returns default task if one is defined (The default task is the task that is

Powered by Google App Engine
This is Rietveld 408576698