| Index: chrome/browser/ui/webui/options/font_settings_handler.cc
|
| diff --git a/chrome/browser/ui/webui/options/font_settings_handler.cc b/chrome/browser/ui/webui/options/font_settings_handler.cc
|
| index ce58d3922c0fc9184637d7e02211f1fc4009d7c2..22f200e989fa7eceaaac0c9628fe510f6d87d824 100644
|
| --- a/chrome/browser/ui/webui/options/font_settings_handler.cc
|
| +++ b/chrome/browser/ui/webui/options/font_settings_handler.cc
|
| @@ -187,27 +187,23 @@ void FontSettingsHandler::FontsListHasLoaded(
|
| selected_values);
|
| }
|
|
|
| -void FontSettingsHandler::Observe(int type,
|
| - const content::NotificationSource& source,
|
| - const content::NotificationDetails& details) {
|
| - if (type == chrome::NOTIFICATION_PREF_CHANGED) {
|
| - std::string* pref_name = content::Details<std::string>(details).ptr();
|
| - if (*pref_name == prefs::kWebKitStandardFontFamily) {
|
| - SetUpStandardFontSample();
|
| - } else if (*pref_name == prefs::kWebKitSerifFontFamily) {
|
| - SetUpSerifFontSample();
|
| - } else if (*pref_name == prefs::kWebKitSansSerifFontFamily) {
|
| - SetUpSansSerifFontSample();
|
| - } else if (*pref_name == prefs::kWebKitFixedFontFamily ||
|
| - *pref_name == prefs::kWebKitDefaultFixedFontSize) {
|
| - SetUpFixedFontSample();
|
| - } else if (*pref_name == prefs::kWebKitDefaultFontSize) {
|
| - SetUpStandardFontSample();
|
| - SetUpSerifFontSample();
|
| - SetUpSansSerifFontSample();
|
| - } else if (*pref_name == prefs::kWebKitMinimumFontSize) {
|
| - SetUpMinimumFontSample();
|
| - }
|
| +void FontSettingsHandler::OnPreferenceChanged(PrefServiceBase* service,
|
| + const std::string& pref_name) {
|
| + if (pref_name == prefs::kWebKitStandardFontFamily) {
|
| + SetUpStandardFontSample();
|
| + } else if (pref_name == prefs::kWebKitSerifFontFamily) {
|
| + SetUpSerifFontSample();
|
| + } else if (pref_name == prefs::kWebKitSansSerifFontFamily) {
|
| + SetUpSansSerifFontSample();
|
| + } else if (pref_name == prefs::kWebKitFixedFontFamily ||
|
| + pref_name == prefs::kWebKitDefaultFixedFontSize) {
|
| + SetUpFixedFontSample();
|
| + } else if (pref_name == prefs::kWebKitDefaultFontSize) {
|
| + SetUpStandardFontSample();
|
| + SetUpSerifFontSample();
|
| + SetUpSansSerifFontSample();
|
| + } else if (pref_name == prefs::kWebKitMinimumFontSize) {
|
| + SetUpMinimumFontSample();
|
| }
|
| }
|
|
|
|
|