OLD | NEW |
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 #include "chrome/browser/ui/webui/options/font_settings_utils.h" | 5 #include "chrome/browser/ui/webui/options/font_settings_utils.h" |
6 | 6 |
7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
8 | 8 |
9 #include "base/mac/scoped_nsautorelease_pool.h" | 9 #include "base/mac/scoped_nsautorelease_pool.h" |
10 #include "base/sys_string_conversions.h" | 10 #include "base/sys_string_conversions.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 size:[NSFont systemFontSize]]; | 25 size:[NSFont systemFontSize]]; |
26 if (font && | 26 if (font && |
27 [[font familyName] caseInsensitiveCompare:family_name] != NSOrderedSame) { | 27 [[font familyName] caseInsensitiveCompare:family_name] != NSOrderedSame) { |
28 std::string new_family_name = base::SysNSStringToUTF8([font familyName]); | 28 std::string new_family_name = base::SysNSStringToUTF8([font familyName]); |
29 prefs->SetString(family_pref_name, new_family_name); | 29 prefs->SetString(family_pref_name, new_family_name); |
30 } | 30 } |
31 } | 31 } |
32 | 32 |
33 // static | 33 // static |
34 void FontSettingsUtilities::ValidateSavedFonts(PrefService* prefs) { | 34 void FontSettingsUtilities::ValidateSavedFonts(PrefService* prefs) { |
35 ValidateFontFamily(prefs, prefs::kWebKitSerifFontFamily); | 35 ValidateFontFamily(prefs, prefs::kWebKitGlobalSerifFontFamily); |
36 ValidateFontFamily(prefs, prefs::kWebKitSansSerifFontFamily); | 36 ValidateFontFamily(prefs, prefs::kWebKitGlobalSansSerifFontFamily); |
37 ValidateFontFamily(prefs, prefs::kWebKitFixedFontFamily); | 37 ValidateFontFamily(prefs, prefs::kWebKitGlobalFixedFontFamily); |
38 } | 38 } |
OLD | NEW |