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

Side by Side Diff: chrome/installer/mac/app/NSError+ChromeInstallerAdditions.m

Issue 2203583002: Added unpacking step (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added DMG to build file Created 4 years, 3 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 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 "NSError+ChromeInstallerAdditions.h" 5 #import "NSError+ChromeInstallerAdditions.h"
6 6
7 @implementation NSError (ChromeInstallerAdditions) 7 @implementation NSError (ChromeInstallerAdditions)
8 // Creates a custom error object to be used as the popup alert that the user
9 // will be shown.
10 + (NSError*)errorForAlerts:(NSString*)message 8 + (NSError*)errorForAlerts:(NSString*)message
11 withDescription:(NSString*)description 9 withDescription:(NSString*)description
12 isRecoverable:(BOOL)recoverable { 10 isRecoverable:(BOOL)recoverable {
13 NSArray* options = @[]; 11 NSArray* options = @[];
14 if (recoverable) { 12 if (recoverable) {
15 options = @[ @"Try Again", @"Quit" ]; 13 options = @[ @"Try Again", @"Quit" ];
16 } else { 14 } else {
17 options = @[ @"Quit" ]; 15 options = @[ @"Quit" ];
18 } 16 }
19 17
20 NSDictionary* errorContents = @{ 18 NSDictionary* errorContents = @{
21 NSLocalizedDescriptionKey : NSLocalizedString(message, nil), 19 NSLocalizedDescriptionKey : NSLocalizedString(message, nil),
22 NSLocalizedRecoveryOptionsErrorKey : options, 20 NSLocalizedRecoveryOptionsErrorKey : options,
23 NSLocalizedRecoverySuggestionErrorKey : NSLocalizedString(description, nil) 21 NSLocalizedRecoverySuggestionErrorKey : NSLocalizedString(description, nil)
24 }; 22 };
25 return [NSError errorWithDomain:@"ChromeErrorDomain" 23 return [NSError errorWithDomain:@"ChromeErrorDomain"
26 code:-1 24 code:-1
27 userInfo:errorContents]; 25 userInfo:errorContents];
28 } 26 }
29 @end 27 @end
OLDNEW
« no previous file with comments | « chrome/installer/mac/app/NSError+ChromeInstallerAdditions.h ('k') | chrome/installer/mac/app/OmahaCommunication.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698