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

Unified Diff: services/service_manager/embedder/mac_init.mm

Issue 2613653003: Move some basic early process init into Service Manager (Closed)
Patch Set: fix mac shutdown order Created 3 years, 9 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 | « services/service_manager/embedder/mac_init.h ('k') | services/service_manager/embedder/main.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/service_manager/embedder/mac_init.mm
diff --git a/services/service_manager/embedder/mac_init.mm b/services/service_manager/embedder/mac_init.mm
new file mode 100644
index 0000000000000000000000000000000000000000..64953e7760113d14c78d96cd9634f434e0709b6c
--- /dev/null
+++ b/services/service_manager/embedder/mac_init.mm
@@ -0,0 +1,25 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "services/service_manager/embedder/mac_init.h"
+
+#import <Cocoa/Cocoa.h>
+
+namespace service_manager {
+
+void InitializeMac() {
+ [[NSUserDefaults standardUserDefaults] registerDefaults:@{
+ // Exceptions routed to -[NSApplication reportException:] should crash
+ // immediately, as opposed being swallowed or presenting UI that gives the
+ // user a choice in the matter.
+ @"NSApplicationCrashOnExceptions" : @YES,
+
+ // Prevent Cocoa from turning command-line arguments into -[NSApplication
+ // application:openFile:], because they are handled directly. @"NO" looks
+ // like a mistake, but the value really is supposed to be a string.
+ @"NSTreatUnknownArgumentsAsOpen" : @"NO",
+ }];
+}
+
+} // namespace service_manager
« no previous file with comments | « services/service_manager/embedder/mac_init.h ('k') | services/service_manager/embedder/main.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698