Chromium Code Reviews| Index: chrome/browser/platform_util_mac.mm |
| diff --git a/chrome/browser/platform_util_mac.mm b/chrome/browser/platform_util_mac.mm |
| index 20afdcd498551dc62f38e74f641dbd444b5b4003..10183615aed0341d5b4f2f06ed1ac6f559b5c002 100644 |
| --- a/chrome/browser/platform_util_mac.mm |
| +++ b/chrome/browser/platform_util_mac.mm |
| @@ -11,6 +11,8 @@ |
| #include "base/files/file_path.h" |
| #include "base/logging.h" |
| #include "base/mac/mac_logging.h" |
| +#import "base/mac/mac_util.h" |
| +#import "base/mac/sdk_forward_declarations.h" |
| #include "base/mac/scoped_aedesc.h" |
| #include "base/strings/sys_string_conversions.h" |
| #include "url/gurl.h" |
| @@ -38,6 +40,21 @@ void OpenItem(Profile* profile, const base::FilePath& full_path) { |
| if (!path_string) |
| return; |
| + if (base::mac::IsOSMavericksOrLater()) { |
|
Avi (use Gerrit)
2014/09/29 15:36:00
Fix the comment at the top of the function ("This
Robert Sesek
2014/09/29 15:41:16
Done.
|
| + NSURL* url = [NSURL fileURLWithPath:path_string]; |
| + if (!url) |
| + return; |
| + |
| + const NSWorkspaceLaunchOptions launch_options = |
| + NSWorkspaceLaunchAsync | NSWorkspaceLaunchWithErrorPresentation; |
| + [[NSWorkspace sharedWorkspace] openURLs:@[ url ] |
| + withAppBundleIdentifier:nil |
| + options:launch_options |
| + additionalEventParamDescriptor:nil |
| + launchIdentifiers:NULL]) { |
| + return; |
| + } |
| + |
| // Create the target of this AppleEvent, the Finder. |
| base::mac::ScopedAEDesc<AEAddressDesc> address; |
| const OSType finderCreatorCode = 'MACS'; |