diff options
author | serya@chromium.org <serya@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-01 13:48:45 +0000 |
---|---|---|
committer | serya@chromium.org <serya@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-01 13:48:45 +0000 |
commit | 802b42cf87cfecb77e5fd6c6bed63037e46f767a (patch) | |
tree | d4933274d7861e0c35136f526dfc16da6fbea9b5 /chrome/browser/platform_util_chromeos.cc | |
parent | 748e412f6ee73a0724cb4ce7afabe2c977c36a77 (diff) | |
download | chromium_src-802b42cf87cfecb77e5fd6c6bed63037e46f767a.zip chromium_src-802b42cf87cfecb77e5fd6c6bed63037e46f767a.tar.gz chromium_src-802b42cf87cfecb77e5fd6c6bed63037e46f767a.tar.bz2 |
Paths in File Browsers parameters are converted to virtual ones.
BUG=chromium-os:17412
TEST=None
Review URL: http://codereview.chromium.org/7497037
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94897 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/platform_util_chromeos.cc')
-rw-r--r-- | chrome/browser/platform_util_chromeos.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/chrome/browser/platform_util_chromeos.cc b/chrome/browser/platform_util_chromeos.cc index 2b29de3..b747415 100644 --- a/chrome/browser/platform_util_chromeos.cc +++ b/chrome/browser/platform_util_chromeos.cc @@ -24,14 +24,23 @@ static const std::string kGmailComposeUrl = "https://mail.google.com/mail/?extsrc=mailto&url="; // Opens file browser on UI thread. +static void OpenFileBrowserOnUIThread(const FilePath& dir) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); Browser* browser = BrowserList::GetLastActive(); if (!browser) return; + + FilePath virtual_path; + if (!FileManagerUtil::ConvertFileToRelativeFileSystemPath(browser->profile(), + dir, + &virtual_path)) { + return; + } + GURL url = FileManagerUtil::GetFileBrowserUrlWithParams( - SelectFileDialog::SELECT_NONE, string16(), dir, NULL, 0, + SelectFileDialog::SELECT_NONE, string16(), virtual_path, NULL, 0, FilePath::StringType()); browser->ShowSingletonTab(url); } |