summaryrefslogtreecommitdiffstats
path: root/chrome/browser/platform_util_chromeos.cc
diff options
context:
space:
mode:
authorkaznacheev@chromium.org <kaznacheev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-17 11:04:12 +0000
committerkaznacheev@chromium.org <kaznacheev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-17 11:04:12 +0000
commit93869f3a4dbb6899e8ea70d4c9cfc97c65155599 (patch)
tree5684a3d2a00359015ada4858e39e93b6ae0f619a /chrome/browser/platform_util_chromeos.cc
parent31e7fba2a2feddd74c14b9c717d6e30c5d7fa1de (diff)
downloadchromium_src-93869f3a4dbb6899e8ea70d4c9cfc97c65155599.zip
chromium_src-93869f3a4dbb6899e8ea70d4c9cfc97c65155599.tar.gz
chromium_src-93869f3a4dbb6899e8ea70d4c9cfc97c65155599.tar.bz2
Made File Manager respect the user-selected launch type (tab/pinned tab/window/fullscreen)"
BUG=chromium-os:27884 TEST= Review URL: http://codereview.chromium.org/10094012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132564 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/platform_util_chromeos.cc')
-rw-r--r--chrome/browser/platform_util_chromeos.cc32
1 files changed, 1 insertions, 31 deletions
diff --git a/chrome/browser/platform_util_chromeos.cc b/chrome/browser/platform_util_chromeos.cc
index 5f3932d..7e46404 100644
--- a/chrome/browser/platform_util_chromeos.cc
+++ b/chrome/browser/platform_util_chromeos.cc
@@ -24,35 +24,6 @@ namespace {
const char kGmailComposeUrl[] =
"https://mail.google.com/mail/?extsrc=mailto&url=";
-void OpenFileBrowserOnUIThread(const FilePath& dir) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
-
- Browser* browser = BrowserList::GetLastActive();
- if (!browser)
- return;
-
- FilePath virtual_path;
- if (!file_manager_util::ConvertFileToRelativeFileSystemPath(
- browser->profile(), dir, &virtual_path)) {
- return;
- }
-
- GURL url = file_manager_util::GetFileBrowserUrlWithParams(
- SelectFileDialog::SELECT_NONE, string16(), virtual_path, NULL, 0,
- FilePath::StringType());
- browser->ShowSingletonTab(url);
-}
-
-// file_util::DirectoryExists must be called on the FILE thread.
-void ShowItemInFolderOnFileThread(const FilePath& full_path) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
- FilePath dir = full_path.DirName();
- if (file_util::DirectoryExists(dir)) {
- BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
- base::Bind(&OpenFileBrowserOnUIThread, dir));
- }
-}
-
void OpenItemOnFileThread(const FilePath& full_path) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
base::Closure callback;
@@ -74,8 +45,7 @@ namespace platform_util {
void ShowItemInFolder(const FilePath& full_path) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
- base::Bind(&ShowItemInFolderOnFileThread, full_path));
+ file_manager_util::ShowFileInFolder(full_path);
}
void OpenItem(const FilePath& full_path) {