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

Unified Diff: chrome/installer/mac/app/AppDelegate.mm

Issue 2270083002: Added in switches for the Mac Installer to send preferences to Chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cl5_review
Patch Set: Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/installer/mac/app/AppDelegate.mm
diff --git a/chrome/installer/mac/app/AppDelegate.m b/chrome/installer/mac/app/AppDelegate.mm
similarity index 92%
rename from chrome/installer/mac/app/AppDelegate.m
rename to chrome/installer/mac/app/AppDelegate.mm
index 341fb2cda9db23110bb5b28b895225591f98bfa0..a7e8b0daad75b8c64fe6223d8e8391066d4e93c5 100644
--- a/chrome/installer/mac/app/AppDelegate.m
+++ b/chrome/installer/mac/app/AppDelegate.mm
@@ -4,6 +4,8 @@
#import "AppDelegate.h"
+#include "chrome/common/chrome_switches.h"
+
#import "Downloader.h"
#import "InstallerWindowController.h"
#import "NSError+ChromeInstallerAdditions.h"
@@ -136,14 +138,22 @@
NSLog(@"%@", error);
}
- // TODO: edit the below code to feed in command line arguments
+ NSMutableArray* installerSettings = [[NSMutableArray alloc] init];
+ if ([installerWindowController_ isUserMetricsChecked])
+ [installerSettings
+ addObject:[NSString stringWithUTF8String:switches::kEnableUserMetrics]];
+ if ([installerWindowController_ isDefaultBrowserChecked])
+ [installerSettings
+ addObject:[NSString stringWithUTF8String:switches::kSetDefaultBrowser]];
[[NSWorkspace sharedWorkspace]
launchApplicationAtURL:
[NSURL fileURLWithPath:@"/Applications/Google Chromo.app"
isDirectory:NO]
options:NSWorkspaceLaunchDefault
- configuration:@{}
+ configuration:@{
+ NSWorkspaceLaunchConfigurationArguments : installerSettings
+ }
error:&error];
if (error) {
NSLog(@"Chromo failed to launch: %@", error);

Powered by Google App Engine
This is Rietveld 408576698