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

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: Rebased 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
« no previous file with comments | « chrome/installer/mac/app/AppDelegate.m ('k') | chrome/installer/mac/app/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2da8618dfa3b5a0898ef2d26737baa435fe40aaf..1f6e4e990b274785461c0daf78923dc30b2d69dd 100644
--- a/chrome/installer/mac/app/AppDelegate.m
+++ b/chrome/installer/mac/app/AppDelegate.mm
@@ -6,6 +6,8 @@
#include <Security/Security.h>
+#include "chrome/common/chrome_switches.h"
+
#import "Downloader.h"
#import "InstallerWindowController.h"
#import "NSError+ChromeInstallerAdditions.h"
@@ -162,12 +164,23 @@
NSString* chromeInApplicationsFolder =
[authorizedInstall_ startInstall:tempAppPath];
+ NSMutableArray* installerSettings = [[NSMutableArray alloc] init];
+ if ([installerWindowController_ isUserMetricsChecked])
+ [installerSettings
+ addObject:[NSString stringWithUTF8String:switches::kEnableUserMetrics]];
+ if ([installerWindowController_ isDefaultBrowserChecked])
+ [installerSettings
+ addObject:[NSString
+ stringWithUTF8String:switches::kMakeDefaultBrowser]];
+
NSError* error = nil;
[[NSWorkspace sharedWorkspace]
launchApplicationAtURL:[NSURL fileURLWithPath:chromeInApplicationsFolder
isDirectory:NO]
options:NSWorkspaceLaunchDefault
- configuration:@{}
+ configuration:@{
+ NSWorkspaceLaunchConfigurationArguments : installerSettings
+ }
error:&error];
if (error) {
NSLog(@"Chrome failed to launch: %@", error);
« no previous file with comments | « chrome/installer/mac/app/AppDelegate.m ('k') | chrome/installer/mac/app/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698