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 0eec3d867433011a6ea154802ac7956516460ac7..3e416114171805c47b79a88822ef9f8dc2260b21 100644 |
--- a/chrome/browser/ui/prefs/prefs_tab_helper.cc |
+++ b/chrome/browser/ui/prefs/prefs_tab_helper.cc |
@@ -131,12 +131,13 @@ void RegisterFontFamilyMapObserver( |
PrefChangeRegistrar* registrar, |
const char* map_name, |
const PrefChangeRegistrar::NamedChangeCallback& obs) { |
- bool result = StartsWithASCII(map_name, "webkit.webprefs.", true); |
- DCHECK(result); |
+ DCHECK(StartsWithASCII(map_name, "webkit.webprefs.", true)); |
+ |
+ std::string pref_name; |
Nico
2014/12/03 21:16:46
This too
|
for (size_t i = 0; i < prefs::kWebKitScriptsForFontFamilyMapsLength; ++i) { |
const char* script = prefs::kWebKitScriptsForFontFamilyMaps[i]; |
std::string pref_name = base::StringPrintf("%s.%s", map_name, script); |
- registrar->Add(pref_name.c_str(), obs); |
+ registrar->Add(pref_name, obs); |
Peter Kasting
2014/12/03 21:21:03
My same question from the other file applies here.
|
} |
} |
@@ -632,7 +633,7 @@ void PrefsTabHelper::OnFontFamilyPrefChanged(const std::string& pref_name) { |
&generic_family, |
&script)) { |
PrefService* prefs = GetProfile()->GetPrefs(); |
- std::string pref_value = prefs->GetString(pref_name.c_str()); |
+ std::string pref_value = prefs->GetString(pref_name); |
if (pref_value.empty()) { |
WebPreferences web_prefs = |
web_contents_->GetRenderViewHost()->GetWebkitPreferences(); |