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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 10107014: Migrate WebKit "global script" font prefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_font_settings_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_content_browser_client.cc
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index fad4f84834ed862c16d72005ba1761c228feba30..1c5efe57c96e212c730268db465e4a0463e6198f 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -305,7 +305,7 @@ void FillFontFamilyMap(const PrefService* prefs,
std::string pref_name = base::StringPrintf("%s.%s", map_name, script);
std::string font_family = prefs->GetString(pref_name.c_str());
if (!font_family.empty())
- map->push_back(std::make_pair(script, UTF8ToUTF16(font_family)));
+ (*map)[script] = UTF8ToUTF16(font_family);
}
}
@@ -1334,19 +1334,6 @@ void ChromeContentBrowserClient::OverrideWebkitPrefs(
rvh->GetProcess()->GetBrowserContext());
PrefService* prefs = profile->GetPrefs();
- web_prefs->standard_font_family =
- UTF8ToUTF16(prefs->GetString(prefs::kWebKitGlobalStandardFontFamily));
- web_prefs->fixed_font_family =
- UTF8ToUTF16(prefs->GetString(prefs::kWebKitGlobalFixedFontFamily));
- web_prefs->serif_font_family =
- UTF8ToUTF16(prefs->GetString(prefs::kWebKitGlobalSerifFontFamily));
- web_prefs->sans_serif_font_family =
- UTF8ToUTF16(prefs->GetString(prefs::kWebKitGlobalSansSerifFontFamily));
- web_prefs->cursive_font_family =
- UTF8ToUTF16(prefs->GetString(prefs::kWebKitGlobalCursiveFontFamily));
- web_prefs->fantasy_font_family =
- UTF8ToUTF16(prefs->GetString(prefs::kWebKitGlobalFantasyFontFamily));
-
FillFontFamilyMap(prefs, prefs::kWebKitStandardFontFamilyMap,
&web_prefs->standard_font_family_map);
FillFontFamilyMap(prefs, prefs::kWebKitFixedFontFamilyMap,
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_font_settings_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698