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

Unified Diff: chrome/browser/ui/webui/options/font_settings_handler.cc

Issue 7554008: Removal of Profile from content part 6. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Profile helper function, rebase Created 9 years, 4 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
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 95521ba3e3e43d8ba6327336de1028040cee0036..12e40844b21f2d77ee4e57a9e653bedb26e052ba 100644
--- a/chrome/browser/ui/webui/options/font_settings_handler.cc
+++ b/chrome/browser/ui/webui/options/font_settings_handler.cc
@@ -78,7 +78,7 @@ WebUIMessageHandler* FontSettingsHandler::Attach(WebUI* web_ui) {
// Perform validation for saved fonts.
DCHECK(web_ui_);
- PrefService* pref_service = web_ui_->GetProfile()->GetPrefs();
+ PrefService* pref_service = Profile::FromWebUI(web_ui_)->GetPrefs();
FontSettingsUtilities::ValidateSavedFonts(pref_service);
// Register for preferences that we need to observe manually.
@@ -110,7 +110,7 @@ void FontSettingsHandler::FontsListHasLoaded(
scoped_refptr<content::FontListResult> list) {
ListValue encoding_list;
const std::vector<CharacterEncoding::EncodingInfo>* encodings;
- PrefService* pref_service = web_ui_->GetProfile()->GetPrefs();
+ PrefService* pref_service = Profile::FromWebUI(web_ui_)->GetPrefs();
encodings = CharacterEncoding::GetCurrentDisplayEncodings(
g_browser_process->GetApplicationLocale(),
pref_service->GetString(prefs::kStaticEncodings),
« no previous file with comments | « chrome/browser/ui/webui/options/core_options_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