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

Side by Side Diff: chrome/common/platform_util_linux.cc

Issue 52034: Implement basic ShowItemInFolder for linux.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/common/platform_util.h ('k') | chrome/common/platform_util_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/common/platform_util.h"
6
7 #include "base/file_path.h"
8 #include "base/file_util.h"
9 #include "base/process_util.h"
10
11 namespace platform_util {
12
13 // TODO(estade): It would be nice to be able to select the file in the file
14 // manager, but that probably requires extending xdg-open. For now just
15 // show the folder.
16 void ShowItemInFolder(const FilePath& full_path) {
17 FilePath dir = full_path.DirName();
18 if (!file_util::DirectoryExists(dir))
19 return;
20
21 std::vector<std::string> argv;
22 argv.push_back("xdg-open");
23 argv.push_back(dir.value());
24 base::file_handle_mapping_vector no_files;
25 base::LaunchApp(argv, no_files, false, NULL);
26 }
27
28 } // namespace platform_util
OLDNEW
« no previous file with comments | « chrome/common/platform_util.h ('k') | chrome/common/platform_util_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698