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

Side by Side Diff: remoting/host/installer/mac/uninstaller/remoting_uninstaller_app.mm

Issue 810133003: replace NULL->nullptr in src/remoting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "remoting/host/installer/mac/uninstaller/remoting_uninstaller_app.h" 5 #include "remoting/host/installer/mac/uninstaller/remoting_uninstaller_app.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #include "remoting/host/installer/mac/uninstaller/remoting_uninstaller.h" 9 #include "remoting/host/installer/mac/uninstaller/remoting_uninstaller.h"
10 10
(...skipping 22 matching lines...) Expand all
33 @try { 33 @try {
34 NSLog(@"Chrome Remote Desktop uninstall starting."); 34 NSLog(@"Chrome Remote Desktop uninstall starting.");
35 35
36 RemotingUninstaller* uninstaller = 36 RemotingUninstaller* uninstaller =
37 [[[RemotingUninstaller alloc] init] autorelease]; 37 [[[RemotingUninstaller alloc] init] autorelease];
38 OSStatus status = [uninstaller remotingUninstall]; 38 OSStatus status = [uninstaller remotingUninstall];
39 39
40 NSLog(@"Chrome Remote Desktop Host uninstall complete."); 40 NSLog(@"Chrome Remote Desktop Host uninstall complete.");
41 41
42 bool success = false; 42 bool success = false;
43 NSString* message = NULL; 43 NSString* message = nullptr;
44 if (status == errAuthorizationSuccess) { 44 if (status == errAuthorizationSuccess) {
45 success = true; 45 success = true;
46 message = @"Chrome Remote Desktop Host successfully uninstalled."; 46 message = @"Chrome Remote Desktop Host successfully uninstalled.";
47 } else if (status == errAuthorizationCanceled) { 47 } else if (status == errAuthorizationCanceled) {
48 message = @"Chrome Remote Desktop Host uninstall canceled."; 48 message = @"Chrome Remote Desktop Host uninstall canceled.";
49 } else if (status == errAuthorizationDenied) { 49 } else if (status == errAuthorizationDenied) {
50 message = @"Chrome Remote Desktop Host uninstall authorization denied."; 50 message = @"Chrome Remote Desktop Host uninstall authorization denied.";
51 } else { 51 } else {
52 [NSException raise:@"AuthorizationCopyRights Failure" 52 [NSException raise:@"AuthorizationCopyRights Failure"
53 format:@"Error during AuthorizationCopyRights status=%d", 53 format:@"Error during AuthorizationCopyRights status=%d",
54 static_cast<int>(status)]; 54 static_cast<int>(status)];
55 } 55 }
56 if (message != NULL) { 56 if (message != nullptr) {
57 NSLog(@"Uninstall %s: %@", success ? "succeeded" : "failed", message); 57 NSLog(@"Uninstall %s: %@", success ? "succeeded" : "failed", message);
58 [self showSuccess:success withMessage:message]; 58 [self showSuccess:success withMessage:message];
59 } 59 }
60 } 60 }
61 @catch (NSException* exception) { 61 @catch (NSException* exception) {
62 NSLog(@"Exception %@ %@", [exception name], [exception reason]); 62 NSLog(@"Exception %@ %@", [exception name], [exception reason]);
63 NSString* message = 63 NSString* message =
64 @"Error! Unable to uninstall Chrome Remote Desktop Host."; 64 @"Error! Unable to uninstall Chrome Remote Desktop Host.";
65 [self showSuccess:false withMessage:message]; 65 [self showSuccess:false withMessage:message];
66 } 66 }
(...skipping 27 matching lines...) Expand all
94 94
95 NSLog(@"Chrome Remote Desktop Host uninstall complete."); 95 NSLog(@"Chrome Remote Desktop Host uninstall complete.");
96 NSLog(@"Status = %d", static_cast<int>(status)); 96 NSLog(@"Status = %d", static_cast<int>(status));
97 return status != errAuthorizationSuccess; 97 return status != errAuthorizationSuccess;
98 } 98 }
99 } else { 99 } else {
100 return NSApplicationMain(argc, (const char**)argv); 100 return NSApplicationMain(argc, (const char**)argv);
101 } 101 }
102 } 102 }
103 103
OLDNEW
« no previous file with comments | « remoting/host/installer/mac/uninstaller/remoting_uninstaller.mm ('k') | remoting/host/ipc_desktop_environment_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698