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

Side by Side Diff: chrome/browser/ui/webui/options/font_settings_utils_mac.mm

Issue 12211105: Move remaining non-test, non-Chrome-specific Prefs code to base/prefs/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments, merge to LKGR. Created 7 years, 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/prefs/pref_service.h"
10 #include "base/sys_string_conversions.h" 11 #include "base/sys_string_conversions.h"
11 #include "base/values.h" 12 #include "base/values.h"
12 #include "chrome/browser/prefs/pref_service.h"
13 #include "chrome/common/pref_names.h" 13 #include "chrome/common/pref_names.h"
14 14
15 namespace options { 15 namespace options {
16 16
17 static void ValidateFontFamily(PrefService* prefs, 17 static void ValidateFontFamily(PrefService* prefs,
18 const char* family_pref_name) { 18 const char* family_pref_name) {
19 // The native font settings dialog saved fonts by the font name, rather 19 // The native font settings dialog saved fonts by the font name, rather
20 // than the family name. This worked for the old dialog since 20 // than the family name. This worked for the old dialog since
21 // -[NSFont fontWithName:size] accepted a font or family name, but the 21 // -[NSFont fontWithName:size] accepted a font or family name, but the
22 // behavior was technically wrong. Since we really need the family name for 22 // behavior was technically wrong. Since we really need the family name for
(...skipping 10 matching lines...) Expand all
33 } 33 }
34 34
35 // static 35 // static
36 void FontSettingsUtilities::ValidateSavedFonts(PrefService* prefs) { 36 void FontSettingsUtilities::ValidateSavedFonts(PrefService* prefs) {
37 ValidateFontFamily(prefs, prefs::kWebKitSerifFontFamily); 37 ValidateFontFamily(prefs, prefs::kWebKitSerifFontFamily);
38 ValidateFontFamily(prefs, prefs::kWebKitSansSerifFontFamily); 38 ValidateFontFamily(prefs, prefs::kWebKitSansSerifFontFamily);
39 ValidateFontFamily(prefs, prefs::kWebKitFixedFontFamily); 39 ValidateFontFamily(prefs, prefs::kWebKitFixedFontFamily);
40 } 40 }
41 41
42 } // namespace options 42 } // namespace options
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/font_settings_handler.cc ('k') | chrome/browser/ui/webui/options/handler_options_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698