Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #import "chrome/browser/ui/cocoa/window_restore_utils.h" | |
| 6 | |
| 7 #include "base/mac/mac_util.h" | |
| 8 | |
| 9 namespace restore_utils { | |
| 10 | |
| 11 bool IsWindowRestoreEnabled() { | |
| 12 if (!base::mac::IsOSLionOrLater()) | |
| 13 return false; | |
| 14 | |
| 15 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults]; | |
|
Robert Sesek
2011/07/28 18:30:22
Need to #import Foundation
dhollowa
2011/07/28 20:05:35
Done.
| |
| 16 // The defaults must be synchronized here otherwise a stale value will be | |
| 17 // returned for an indeterminate amount of time. | |
| 18 [defaults synchronize]; | |
| 19 return !![defaults boolForKey:@"NSQuitAlwaysKeepsWindows"]; | |
| 20 } | |
| 21 | |
| 22 } // namespace restore_utils | |
| OLD | NEW |