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

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

Issue 14670023: ChromeOS: Support opening files with apps from the downloads page. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: prioritize fallback handlers over non-default app handlers Created 7 years, 6 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.cc
diff --git a/chrome/browser/chromeos/extensions/file_manager/file_handler_util.cc b/chrome/browser/chromeos/extensions/file_manager/file_handler_util.cc
index c6e1ba23b525176483af1596cc890f13a91ecbcb..d1c60c365bac1f9ab20887546726e35beda124e8 100644
--- a/chrome/browser/chromeos/extensions/file_manager/file_handler_util.cc
+++ b/chrome/browser/chromeos/extensions/file_manager/file_handler_util.cc
@@ -98,16 +98,6 @@ int ExtractProcessFromExtensionId(Profile* profile,
return process->GetID();
}
-// Returns true if the task should be used as a fallback. Such tasks are
-// Files.app's internal handlers as well as quick office extensions.
-bool IsFallbackTask(const FileBrowserHandler* task) {
- return (task->extension_id() == kFileBrowserDomain ||
- task->extension_id() ==
- extension_misc::kQuickOfficeComponentExtensionId ||
- task->extension_id() == extension_misc::kQuickOfficeDevExtensionId ||
- task->extension_id() == extension_misc::kQuickOfficeExtensionId);
-}
-
const FileBrowserHandler* FindFileBrowserHandler(const Extension* extension,
const std::string& action_id) {
FileBrowserHandler::List* handler_list =
@@ -186,6 +176,14 @@ bool GetFileBrowserHandlers(Profile* profile,
} // namespace
+bool IsFallbackTask(const FileBrowserHandler* task) {
+ return (task->extension_id() == kFileBrowserDomain ||
+ task->extension_id() ==
+ extension_misc::kQuickOfficeComponentExtensionId ||
+ task->extension_id() == extension_misc::kQuickOfficeDevExtensionId ||
+ task->extension_id() == extension_misc::kQuickOfficeExtensionId);
+}
+
void UpdateDefaultTask(Profile* profile,
const std::string& task_id,
const std::set<std::string>& suffixes,

Powered by Google App Engine
This is Rietveld 408576698