diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-24 20:40:44 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-24 20:40:44 +0000 |
commit | 1a9e11dc906e39de6436a4a60ae80db9b3ec47a8 (patch) | |
tree | e54cc697681f4ea68e5228182458952c1f9cccc8 /chrome/browser/download | |
parent | 0e1b3fb0be8e113a3863017340900e4874d4eb4b (diff) | |
download | chromium_src-1a9e11dc906e39de6436a4a60ae80db9b3ec47a8.zip chromium_src-1a9e11dc906e39de6436a4a60ae80db9b3ec47a8.tar.gz chromium_src-1a9e11dc906e39de6436a4a60ae80db9b3ec47a8.tar.bz2 |
Implement basic ShowItemInFolder for linux.
Note that this only works if you are using a gnome or kde session. Support for other sessions will be added in the future.
Review URL: http://codereview.chromium.org/52034
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12395 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download')
-rw-r--r-- | chrome/browser/download/download_file.cc | 10 | ||||
-rw-r--r-- | chrome/browser/download/save_file_manager.cc | 12 |
2 files changed, 5 insertions, 17 deletions
diff --git a/chrome/browser/download/download_file.cc b/chrome/browser/download/download_file.cc index e70615a..5411662 100644 --- a/chrome/browser/download/download_file.cc +++ b/chrome/browser/download/download_file.cc @@ -16,6 +16,7 @@ #include "chrome/browser/tab_contents/tab_util.h" #include "chrome/browser/tab_contents/web_contents.h" #include "chrome/common/chrome_paths.h" +#include "chrome/common/platform_util.h" #include "chrome/common/stl_util-inl.h" #include "googleurl/src/gurl.h" #include "net/base/io_buffer.h" @@ -517,17 +518,12 @@ void DownloadFileManager::OnDownloadUrl(const GURL& url, // Actions from the UI thread and run on the download thread -// Open a download, or show it in a Windows Explorer window. We run on this +// Open a download, or show it in a file explorer window. We run on this // thread to avoid blocking the UI with (potentially) slow Shell operations. // TODO(paulg): File 'stat' operations. void DownloadFileManager::OnShowDownloadInShell(const FilePath& full_path) { -#if defined(OS_WIN) DCHECK(MessageLoop::current() == file_loop_); - win_util::ShowItemInFolder(full_path.value()); -#else - // TODO(port) implement me. - NOTREACHED(); -#endif + platform_util::ShowItemInFolder(full_path); } // Launches the selected download using ShellExecute 'open' verb. If there is diff --git a/chrome/browser/download/save_file_manager.cc b/chrome/browser/download/save_file_manager.cc index 9f444c50..9e8e885 100644 --- a/chrome/browser/download/save_file_manager.cc +++ b/chrome/browser/download/save_file_manager.cc @@ -17,6 +17,7 @@ #include "chrome/browser/tab_contents/tab_util.h" #include "chrome/browser/tab_contents/web_contents.h" #include "chrome/common/chrome_paths.h" +#include "chrome/common/platform_util.h" #include "chrome/common/stl_util-inl.h" #include "googleurl/src/gurl.h" #include "net/base/net_util.h" @@ -24,10 +25,6 @@ #include "net/url_request/url_request_context.h" #if defined(OS_WIN) -#include "chrome/common/win_util.h" -#endif - -#if defined(OS_WIN) // TODO(port): port these headers to posix. #include "chrome/browser/tab_contents/tab_contents.h" #elif defined(OS_POSIX) @@ -521,12 +518,7 @@ void SaveFileManager::OnDeleteDirectoryOrFile(const FilePath& full_path, // We run on this thread to avoid blocking the UI with slow Shell operations. void SaveFileManager::OnShowSavedFileInShell(const FilePath full_path) { DCHECK(MessageLoop::current() == GetSaveLoop()); - // TODO(port): make an equivalent call on mac/linux. -#if defined(OS_WIN) - win_util::ShowItemInFolder(full_path.value()); -#elif defined(OS_POSIX) - NOTIMPLEMENTED(); -#endif + platform_util::ShowItemInFolder(full_path); } void SaveFileManager::RenameAllFiles( |