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

Side by Side Diff: chrome/installer/mac/app/Unpacker.m

Issue 2370273003: Drop dispatch_release(): ARC manages dispatch queues with a deployment target >= 10.8 (Closed)
Patch Set: Back... with a guard! Created 4 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "Unpacker.h" 5 #import "Unpacker.h"
6 6
7 #import <AppKit/AppKit.h> 7 #import <AppKit/AppKit.h>
8 #include <DiskArbitration/DiskArbitration.h> 8 #include <DiskArbitration/DiskArbitration.h>
9 #include <dispatch/dispatch.h> 9 #include <dispatch/dispatch.h>
10 10
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 kDADiskUnmountOptionWhole | kDADiskUnmountOptionForce, 139 kDADiskUnmountOptionWhole | kDADiskUnmountOptionForce,
140 unmount_callback, (__bridge_retained void*)self); 140 unmount_callback, (__bridge_retained void*)self);
141 141
142 CFRelease(whole_disk); 142 CFRelease(whole_disk);
143 CFRelease(child_disk); 143 CFRelease(child_disk);
144 } 144 }
145 145
146 - (void)didFinishEjectingDisk:(DADiskRef)disk 146 - (void)didFinishEjectingDisk:(DADiskRef)disk
147 withDissenter:(DADissenterRef)dissenter { 147 withDissenter:(DADissenterRef)dissenter {
148 DASessionSetDispatchQueue(session_, NULL); 148 DASessionSetDispatchQueue(session_, NULL);
149 #if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_8
149 dispatch_release(unpack_dq_); 150 dispatch_release(unpack_dq_);
151 #endif
150 CFRelease(session_); 152 CFRelease(session_);
151 NSError* error = nil; 153 NSError* error = nil;
152 if (dissenter) { 154 if (dissenter) {
153 DAReturn status = DADissenterGetStatus(dissenter); 155 DAReturn status = DADissenterGetStatus(dissenter);
154 error = [NSError 156 error = [NSError
155 errorWithDomain:@"ChromeErrorDomain" 157 errorWithDomain:@"ChromeErrorDomain"
156 code:err_get_code(status) 158 code:err_get_code(status)
157 userInfo:@{ 159 userInfo:@{
158 NSLocalizedDescriptionKey : 160 NSLocalizedDescriptionKey :
159 (__bridge NSString*)DADissenterGetStatusString(dissenter) 161 (__bridge NSString*)DADissenterGetStatusString(dissenter)
160 }]; 162 }];
161 [delegate_ unpacker:self onUnmountFailure:error]; 163 [delegate_ unpacker:self onUnmountFailure:error];
162 } else { 164 } else {
163 [self cleanUp]; 165 [self cleanUp];
164 [delegate_ unpacker:self onUnmountSuccess:mountPath_]; 166 [delegate_ unpacker:self onUnmountSuccess:mountPath_];
165 } 167 }
166 } 168 }
167 169
168 @end 170 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698