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

Unified Diff: chrome/browser/chrome_browser_main_mac.mm

Issue 191293017: Mac: Fix registration of user defaults. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix for avi & ccameron. Created 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_browser_main_mac.mm
diff --git a/chrome/browser/chrome_browser_main_mac.mm b/chrome/browser/chrome_browser_main_mac.mm
index cf8a1aedc240cd32a5eec8299e09b8ca9a89bf8a..fa7fbbd92f169143e4c431435d7624fcac3097e4 100644
--- a/chrome/browser/chrome_browser_main_mac.mm
+++ b/chrome/browser/chrome_browser_main_mac.mm
@@ -229,18 +229,19 @@ void ChromeBrowserMainPartsMac::PreMainMessageLoopStart() {
// Make sure the app controller has been created.
DCHECK([NSApp delegate]);
- // Prevent Cocoa from turning command-line arguments into
- // |-application:openFiles:|, since we already handle them directly.
- [[NSUserDefaults standardUserDefaults]
- setObject:@"NO" forKey:@"NSTreatUnknownArgumentsAsOpen"];
- // CoreAnimation has poor performance and CoreAnimation and non-CoreAnimation
- // exhibit window flickering when layers are not hosted in the window server,
- // which is the default when not not using the 10.9 SDK.
- // TODO: Remove this when we build with the 10.9 SDK.
- if (base::mac::IsOSMavericksOrLater())
- [[NSUserDefaults standardUserDefaults]
- setObject:@"YES"
- forKey:@"NSWindowHostsLayersInWindowServer"];
+ [[NSUserDefaults standardUserDefaults] registerDefaults:@{
+ // Prevent Cocoa from turning command-line arguments into
+ // |-application:openFiles:|, since we already handle them directly.
+ // @"NO" looks like a mistake, but the value really is supposed to be a
+ // string.
+ @"NSTreatUnknownArgumentsAsOpen": @"NO",
+ // CoreAnimation has poor performance and CoreAnimation and
+ // non-CoreAnimation exhibit window flickering when layers are not hosted
+ // in the window server, which is the default when not not using the
+ // 10.9 SDK.
+ // TODO: Remove this when we build with the 10.9 SDK.
+ @"NSWindowHostsLayersInWindowServer": @(base::mac::IsOSMavericksOrLater())
+ }];
}
void ChromeBrowserMainPartsMac::PostProfileInit() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698