New issue
Advanced search Search tips

Issue 650790 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 3
Type: Bug

Blocking:
issue 622481
issue 650854



Sign in to add a comment

Remove all references to PathFromFSRef and FSRefFromPath.

Project Member Reported by erikc...@chromium.org, Sep 27 2016

Issue description

These methods both use FSRef APIs, which have been deprecated since macOS 10.8. 

https://cs.chromium.org/search/?q=FSRefFromPath&sq=package:chromium&type=cs
https://cs.chromium.org/search/?q=PathFromFSRef&sq=package:chromium&type=cs

ExecFilePathWatcherCallback::NotifyPathChanged
base::mac::OpenApplicationWithPath
AddQuarantineMetadataToFile
  - fix in progress at crrev.com/2352763006
DaemonControllerDelegateMac::DoShowPreferencePane

A quick glance shows that these should be relatively straight forward - most have clear replacement APIs.
 
Cc: erikc...@chromium.org
 Issue 649044  has been merged into this issue.

Comment 2 Deleted

Project Member

Comment 3 by bugdroid1@chromium.org, Sep 28 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1ad622362c0e3aafc09e34eec49079230c3f5d77

commit 1ad622362c0e3aafc09e34eec49079230c3f5d77
Author: erikchen <erikchen@chromium.org>
Date: Wed Sep 28 22:25:30 2016

On macOS 10.10+, use NSURL methods in quarantine_mac.

FSRef has been deprecated since macOS 10.8, but the replacement for
kLSItemQuarantineProperties was not available until macOS 10.10+. Keep the old
logic for macOS 10.9, but use non-deprecated methods in macOS 10.10+. This CL
adds a test for the new logic.

BUG= 650790 

Review-Url: https://codereview.chromium.org/2352763006
Cr-Commit-Position: refs/heads/master@{#421660}

[modify] https://crrev.com/1ad622362c0e3aafc09e34eec49079230c3f5d77/content/browser/download/quarantine_mac.mm
[add] https://crrev.com/1ad622362c0e3aafc09e34eec49079230c3f5d77/content/browser/download/quarantine_mac_unittest.mm
[modify] https://crrev.com/1ad622362c0e3aafc09e34eec49079230c3f5d77/content/test/BUILD.gn

I looked into getting rid of the FSRef use here, but that's been brought in by LSOpenApplication, which is deprecated:

https://cs.chromium.org/chromium/src/base/mac/launch_services_util.cc?q=FSRefFromPath&sq=package:chromium&dr=C&l=16

I don't see any suitable replacement though. LSOpenFromURLSpec doesn't seem to take argv.
kerrnel: Will "-[NSWorkSpace launchApplicationAtURL]" work? 

https://developer.apple.com/reference/appkit/nsworkspace/1534810-launchapplicationaturl?language=objc

"""
let NSWorkspaceLaunchConfigurationArguments: String
The value is an NSArray of NSStrings, passed to the new app in the argv parameter. Ignored if a new instance of the app is not launched. This constant is not available to sandboxed apps.
"""
CL to fix DaemonControllerDelegateMac::DoShowPreferencePane:
https://codereview.chromium.org/2393753003/
Project Member

Comment 7 by bugdroid1@chromium.org, Oct 5 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/df33482d72769ccc6da015156320bae80172532b

commit df33482d72769ccc6da015156320bae80172532b
Author: erikchen <erikchen@chromium.org>
Date: Wed Oct 05 22:47:11 2016

Remove deprecated method LSOpenFSRef.

It has a drop-in replacement: +[NSWorkspace sharedWorkspace].

BUG= 650790 

Review-Url: https://codereview.chromium.org/2393753003
Cr-Commit-Position: refs/heads/master@{#423322}

[modify] https://crrev.com/df33482d72769ccc6da015156320bae80172532b/remoting/host/setup/daemon_controller_delegate_mac.mm

Blocking: 650854
Cc: thestig@chromium.org
Trying to test service_util fix: https://codereview.chromium.org/2122283002/

Using instructions here: https://bugs.chromium.org/p/chromium/issues/detail?id=74983#c16

But I can't get the cloud print process to persist past Chrome's termination.

Owner: erikc...@chromium.org
Status: Assigned (was: Available)
Status: Fixed (was: Assigned)
Project Member

Comment 13 by bugdroid1@chromium.org, Oct 27 2016

Labels: merge-merged-2840
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/df33482d72769ccc6da015156320bae80172532b

commit df33482d72769ccc6da015156320bae80172532b
Author: erikchen <erikchen@chromium.org>
Date: Wed Oct 05 22:47:11 2016

Remove deprecated method LSOpenFSRef.

It has a drop-in replacement: +[NSWorkspace sharedWorkspace].

BUG= 650790 

Review-Url: https://codereview.chromium.org/2393753003
Cr-Commit-Position: refs/heads/master@{#423322}

[modify] https://crrev.com/df33482d72769ccc6da015156320bae80172532b/remoting/host/setup/daemon_controller_delegate_mac.mm

Comment 14 by dimu@google.com, Nov 4 2016

Labels: -merge-merged-2840
[Automated comment] removing mislabelled merge-merged-2840

Sign in to add a comment