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

Side by Side Diff: chrome/browser/ui/webui/settings/font_handler.cc

Issue 1658793002: Update chrome for new prefs location. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/webui/settings/font_handler.h" 5 #include "chrome/browser/ui/webui/settings/font_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
11 #include "base/i18n/rtl.h" 11 #include "base/i18n/rtl.h"
12 #include "base/prefs/pref_service.h"
13 #include "chrome/browser/browser_process.h" 12 #include "chrome/browser/browser_process.h"
14 #include "chrome/browser/character_encoding.h" 13 #include "chrome/browser/character_encoding.h"
15 #include "chrome/browser/profiles/profile.h" 14 #include "chrome/browser/profiles/profile.h"
16 #include "chrome/browser/ui/webui/options/font_settings_utils.h" 15 #include "chrome/browser/ui/webui/options/font_settings_utils.h"
17 #include "chrome/common/pref_names.h" 16 #include "chrome/common/pref_names.h"
17 #include "components/prefs/pref_service.h"
18 #include "content/public/browser/font_list_async.h" 18 #include "content/public/browser/font_list_async.h"
19 #include "content/public/browser/web_ui.h" 19 #include "content/public/browser/web_ui.h"
20 20
21 namespace settings { 21 namespace settings {
22 22
23 FontHandler::FontHandler(content::WebUI* webui) 23 FontHandler::FontHandler(content::WebUI* webui)
24 : weak_ptr_factory_(this) { 24 : weak_ptr_factory_(this) {
25 // Perform validation for saved fonts. 25 // Perform validation for saved fonts.
26 PrefService* pref_service = Profile::FromWebUI(webui)->GetPrefs(); 26 PrefService* pref_service = Profile::FromWebUI(webui)->GetPrefs();
27 options::FontSettingsUtilities::ValidateSavedFonts(pref_service); 27 options::FontSettingsUtilities::ValidateSavedFonts(pref_service);
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 option->AppendString(std::string()); 82 option->AppendString(std::string());
83 } 83 }
84 encoding_list.Append(std::move(option)); 84 encoding_list.Append(std::move(option));
85 } 85 }
86 86
87 web_ui()->CallJavascriptFunction("Settings.setFontsData", *list, 87 web_ui()->CallJavascriptFunction("Settings.setFontsData", *list,
88 encoding_list); 88 encoding_list);
89 } 89 }
90 90
91 } // namespace settings 91 } // namespace settings
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/settings/downloads_handler.cc ('k') | chrome/browser/ui/webui/settings/languages_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698