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

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

Issue 22789002: file_manager: Rename and document some functions in file_manager_util.cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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 | chrome/browser/chromeos/extensions/file_manager/file_manager_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/extensions/file_manager/file_manager_util.h
diff --git a/chrome/browser/chromeos/extensions/file_manager/file_manager_util.h b/chrome/browser/chromeos/extensions/file_manager/file_manager_util.h
index 0932ed22058688d5920abd481a8487a8c2ffe035..8d65c636dc46ec86cd8a93b24bca9ba33bbef60b 100644
--- a/chrome/browser/chromeos/extensions/file_manager/file_manager_util.h
+++ b/chrome/browser/chromeos/extensions/file_manager/file_manager_util.h
@@ -73,15 +73,27 @@ void ViewRemovableDrive(const base::FilePath& path);
// flag to the dialog. If it is enabled, then auto-choice gets disabled.
void OpenActionChoiceDialog(const base::FilePath& path, bool advanced_mode);
-// Opens item with the default File Browser handler.
+// Opens an item (file or directory). If the target is a directory, the
+// directory will be opened in the file manager. If the target is a file, the
+// file will be opened using a file handler, a file browser handler, or the
+// browser (open in a tab). The default handler has precedence over other
+// handlers, if defined for the type of the target file.
void ViewItem(const base::FilePath& path);
// Opens file browser on the folder containing the file, with the file selected.
void ShowFileInFolder(const base::FilePath& path);
-// Executes the built-in File Manager handler or tries to open |path| directly
-// in the browser. Returns false if neither is possible.
-bool ExecuteBuiltinHandler(Browser* browser, const base::FilePath& path);
+// Opens the file specified by |path| with the browser. This function takes
+// care of the following intricacies:
+//
+// - If the file is a Drive hosted document, the hosted document will be
+// opened in the browser by extracting the right URL for the file.
+// - If the file is a CRX file, the CRX file will be installed.
+// - If the file is on Drive, the file will be downloaded from Drive as
+// needed.
+//
+// Returns false if failed to open. This happens if the file type is unknown.
+bool OpenFileWithBrowser(Browser* browser, const base::FilePath& path);
// Checks whether a pepper plugin for |file_extension| is enabled.
bool ShouldBeOpenedWithPlugin(Profile* profile, const char* file_extension);
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/file_manager/file_manager_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698