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

Side by Side Diff: chrome/browser/ui/cocoa/gesture_utils.mm

Issue 7522025: Turn on session restore by default for mac on Lion (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: JS nits and comment correction Created 9 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "chrome/browser/ui/cocoa/gesture_utils.h" 5 #import "chrome/browser/ui/cocoa/gesture_utils.h"
6 6
7 #include "base/mac/mac_util.h" 7 #include "base/mac/mac_util.h"
8 8
9 namespace gesture_utils { 9 namespace gesture_utils {
10 10
(...skipping 22 matching lines...) Expand all
33 } 33 }
34 34
35 // On Lion, returns YES if the scroll direction is "natural"/inverted. All other 35 // On Lion, returns YES if the scroll direction is "natural"/inverted. All other
36 // OSes will return NO. 36 // OSes will return NO.
37 BOOL IsScrollDirectionInverted() { 37 BOOL IsScrollDirectionInverted() {
38 if (!base::mac::IsOSLionOrLater()) 38 if (!base::mac::IsOSLionOrLater())
39 return NO; 39 return NO;
40 40
41 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults]; 41 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
42 // The defaults must be synchronized here otherwise a stale value will be 42 // The defaults must be synchronized here otherwise a stale value will be
43 // returned for an indeterminante amount of time. For some reason, this is 43 // returned for an indeterminate amount of time. For some reason, this is
44 // not necessary in |-recognizeTwoFingerGestures|. 44 // not necessary in |-recognizeTwoFingerGestures|.
45 [defaults synchronize]; 45 [defaults synchronize];
46 return [defaults boolForKey:@"com.apple.swipescrolldirection"]; 46 return [defaults boolForKey:@"com.apple.swipescrolldirection"];
47 } 47 }
48 48
49 } // namespace gesture_utils 49 } // namespace gesture_utils
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698