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

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: 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..8657d201518011474814345255392ce0713838be 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[];
@@ -70,17 +73,17 @@ bool CrackTaskID(const std::string& task_id,
std::string* task_type,
std::string* action_id);
-// This generates a list of default tasks (tasks set as default by the user in
kinaba 2013/05/24 07:34:13 nit: probably this "set" is a past participle of t
mtomasz 2013/05/24 07:49:45 Done.
+// This generates a list of default tasks (tasks list as default by the user in
// 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