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

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

Issue 415403006: [Files App] Only use the first matching file handler from each app. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | « no previous file | no next file » | 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 53cf74bc65ed325772230ab8ef6f1efe10e2c0c9..7965eea0b3908b701c3dd9bee63b8be1f2905ea6 100644
--- a/chrome/browser/chromeos/file_manager/file_tasks.cc
+++ b/chrome/browser/chromeos/file_manager/file_tasks.cc
@@ -413,25 +413,25 @@ void FindFileHandlerTasks(
if (file_handlers.empty())
continue;
- for (FileHandlerList::iterator i = file_handlers.begin();
- i != file_handlers.end(); ++i) {
- std::string task_id = file_tasks::MakeTaskID(
- extension->id(), file_tasks::TASK_TYPE_FILE_HANDLER, (*i)->id);
-
- GURL best_icon = extensions::ExtensionIconSource::GetIconURL(
- extension,
- drive::util::kPreferredIconSize,
- ExtensionIconSet::MATCH_BIGGER,
- false, // grayscale
- NULL); // exists
-
- result_list->push_back(FullTaskDescriptor(
- TaskDescriptor(
- extension->id(), file_tasks::TASK_TYPE_FILE_HANDLER, (*i)->id),
- extension->name(),
- best_icon,
- false /* is_default */));
- }
+ // Only show the first matching handler from each app.
+ const extensions::FileHandlerInfo* file_handler = file_handlers.front();
+ std::string task_id = file_tasks::MakeTaskID(
+ extension->id(), file_tasks::TASK_TYPE_FILE_HANDLER, file_handler->id);
+
+ GURL best_icon = extensions::ExtensionIconSource::GetIconURL(
+ extension,
+ drive::util::kPreferredIconSize,
+ ExtensionIconSet::MATCH_BIGGER,
+ false, // grayscale
+ NULL); // exists
+
+ result_list->push_back(
+ FullTaskDescriptor(TaskDescriptor(extension->id(),
+ file_tasks::TASK_TYPE_FILE_HANDLER,
+ file_handler->id),
+ extension->name(),
+ best_icon,
+ false /* is_default */));
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698