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

Unified Diff: chrome/browser/platform_util.h

Issue 352393002: Be explicit about target type in platform_util::OpenItem() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments 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
Index: chrome/browser/platform_util.h
diff --git a/chrome/browser/platform_util.h b/chrome/browser/platform_util.h
index 916f3a307c78cb99af4dae2f82191483985a8475..bc4fa4aac921d1f580cfe5f8c2b0fb43ff36a013 100644
--- a/chrome/browser/platform_util.h
+++ b/chrome/browser/platform_util.h
@@ -22,12 +22,18 @@ namespace platform_util {
// Show the given file in a file manager. If possible, select the file.
// The |profile| is used to determine the running profile of file manager app
// in Chrome OS only. Not used in other platforms.
-// Must be called from the UI thread.
+// Must be called on the UI thread.
void ShowItemInFolder(Profile* profile, const base::FilePath& full_path);
-// Open the given file in the desktop's default manner.
-// Must be called from the UI thread.
-void OpenItem(Profile* profile, const base::FilePath& full_path);
+// Opens the given file in the desktop's default manner. |full_path| must point
+// to an existing file. If |full_path| doesn't refer to an existing file, then
+// no action will be taken. Must be called on the UI thread.
+void OpenFile(Profile* profile, const base::FilePath& full_path);
+
+// Opens the given folder in the file manager. No action will be taken if
+// |full_path| does not refer to an existing folder. Must be called on the UI
+// thread.
+void OpenFolder(Profile* profile, const base::FilePath& full_path);
// Open the given external protocol URL in the desktop's default manner.
// (For example, mailto: URLs in the default mail user agent.)

Powered by Google App Engine
This is Rietveld 408576698