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

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

Issue 609643002: [CrOS] Show extensions that can use file_handlers in Files app. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 71004e8fea13e0ccc62ae1d7f257157a770c1344..238a29eee0f59909d9e97c557d354d8497e98ef5 100644
--- a/chrome/browser/chromeos/file_manager/file_tasks.cc
+++ b/chrome/browser/chromeos/file_manager/file_tasks.cc
@@ -20,6 +20,7 @@
#include "chrome/browser/extensions/extension_tab_util.h"
#include "chrome/browser/extensions/extension_util.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/ui/extensions/application_launch.h"
#include "chrome/browser/ui/webui/extensions/extension_icon_source.h"
#include "chrome/common/extensions/api/file_browser_handlers/file_browser_handler.h"
#include "chrome/common/extensions/api/file_manager_private.h"
@@ -371,8 +372,9 @@ void FindFileHandlerTasks(
++iter) {
const Extension* extension = iter->get();
- // We don't support using hosted apps to open files.
- if (!extension->is_platform_app())
+ // Check that the extension can be launched via an event. This includes all
+ // platform apps plus whitelisted extensions.
+ if (!CanLaunchViaEvent(extension))
continue;
// Ephemeral apps cannot be file handlers.
« 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