Chromium Code Reviews| Index: chrome/browser/ui/prefs/prefs_tab_helper.cc |
| diff --git a/chrome/browser/ui/prefs/prefs_tab_helper.cc b/chrome/browser/ui/prefs/prefs_tab_helper.cc |
| index db0b657a2219b0b22cd9a71937ca31a6bf632754..226b0c31d59a7792b77809b27b6d50c4239143dc 100644 |
| --- a/chrome/browser/ui/prefs/prefs_tab_helper.cc |
| +++ b/chrome/browser/ui/prefs/prefs_tab_helper.cc |
| @@ -138,12 +138,15 @@ const char* kPrefsToObserve[] = { |
| const int kPrefsToObserveLength = arraysize(kPrefsToObserve); |
| +#if !defined(OS_ANDROID) |
| // Registers a preference under the path |pref_name| for each script used for |
| // per-script font prefs. |
| // For example, for WEBKIT_WEBPREFS_FONTS_SERIF ("fonts.serif"): |
| // "fonts.serif.Arab", "fonts.serif.Hang", etc. are registered. |
| // |fonts_with_defaults| contains all |pref_names| already registered since they |
| // have a specified default value. |
| +// On Android there are no default values for these properties and there is no |
| +// way to set them, so we can avoid registering them altogether. |
|
falken
2013/10/17 12:23:29
Maybe mention that the way to set them on other pl
ppi
2013/10/17 16:49:04
Done.
|
| void RegisterFontFamilyPrefs(user_prefs::PrefRegistrySyncable* registry, |
| const std::set<std::string>& fonts_with_defaults) { |
| @@ -177,7 +180,6 @@ ALL_FONT_SCRIPTS(WEBKIT_WEBPREFS_FONTS_STANDARD) |
| } |
| } |
| -#if !defined(OS_ANDROID) |
| // Registers |obs| to observe per-script font prefs under the path |map_name|. |
| // On android, there's no exposed way to change these prefs, so we can save |
| // ~715KB of heap and some startup cycles by avoiding observing these prefs |
| @@ -612,8 +614,10 @@ void PrefsTabHelper::RegisterProfilePrefs( |
| } |
| } |
| - // Register font prefs that don't have defaults. |
| + // Register per-script font prefs that don't have defaults. |
| +#if !defined(OS_ANDROID) |
| RegisterFontFamilyPrefs(registry, fonts_with_defaults); |
| +#endif |
| registry->RegisterLocalizedIntegerPref( |
| prefs::kWebKitDefaultFontSize, |