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

Side by Side Diff: chrome/browser/ui/prefs/prefs_tab_helper.cc

Issue 10532105: Use ICU script code "Jpan" instead of "Hrkt" in Japanese pref names (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/common/extensions/api/experimental_font_settings.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/prefs/prefs_tab_helper.h" 5 #include "chrome/browser/ui/prefs/prefs_tab_helper.h"
6 6
7 #include "base/string_split.h" 7 #include "base/string_split.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/stringprintf.h" 9 #include "base/stringprintf.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 // USCRIPT_HANGUL and USCRIPT_KOREAN are considered equivalent for the purposes 226 // USCRIPT_HANGUL and USCRIPT_KOREAN are considered equivalent for the purposes
227 // of font selection. Chrome uses the script code USCRIPT_HANGUL (script name 227 // of font selection. Chrome uses the script code USCRIPT_HANGUL (script name
228 // "Hang") in Korean font pref names (for example, 228 // "Hang") in Korean font pref names (for example,
229 // "webkit.webprefs.fonts.serif.Hang"). So, if |scriptCode| is USCRIPT_KOREAN, 229 // "webkit.webprefs.fonts.serif.Hang"). So, if |scriptCode| is USCRIPT_KOREAN,
230 // the function returns USCRIPT_HANGUL. If |scriptCode| is not a member of such 230 // the function returns USCRIPT_HANGUL. If |scriptCode| is not a member of such
231 // a family, returns |scriptCode|. 231 // a family, returns |scriptCode|.
232 UScriptCode GetScriptForFontPrefMatching(UScriptCode scriptCode) { 232 UScriptCode GetScriptForFontPrefMatching(UScriptCode scriptCode) {
233 switch (scriptCode) { 233 switch (scriptCode) {
234 case USCRIPT_HIRAGANA: 234 case USCRIPT_HIRAGANA:
235 case USCRIPT_KATAKANA: 235 case USCRIPT_KATAKANA:
236 case USCRIPT_JAPANESE: 236 case USCRIPT_KATAKANA_OR_HIRAGANA:
237 return USCRIPT_KATAKANA_OR_HIRAGANA; 237 return USCRIPT_JAPANESE;
238 case USCRIPT_KOREAN: 238 case USCRIPT_KOREAN:
239 return USCRIPT_HANGUL; 239 return USCRIPT_HANGUL;
240 default: 240 default:
241 return scriptCode; 241 return scriptCode;
242 } 242 }
243 } 243 }
244 244
245 // Returns the primary script used by the browser's UI locale. For example, if 245 // Returns the primary script used by the browser's UI locale. For example, if
246 // the locale is "ru", the function returns USCRIPT_CYRILLIC, and if the locale 246 // the locale is "ru", the function returns USCRIPT_CYRILLIC, and if the locale
247 // is "en", the function returns USCRIPT_LATIN. 247 // is "en", the function returns USCRIPT_LATIN.
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 533
534 void PrefsTabHelper::UpdateRendererPreferences() { 534 void PrefsTabHelper::UpdateRendererPreferences() {
535 renderer_preferences_util::UpdateFromSystemSettings( 535 renderer_preferences_util::UpdateFromSystemSettings(
536 web_contents_->GetMutableRendererPrefs(), GetProfile()); 536 web_contents_->GetMutableRendererPrefs(), GetProfile());
537 web_contents_->GetRenderViewHost()->SyncRendererPrefs(); 537 web_contents_->GetRenderViewHost()->SyncRendererPrefs();
538 } 538 }
539 539
540 Profile* PrefsTabHelper::GetProfile() { 540 Profile* PrefsTabHelper::GetProfile() {
541 return Profile::FromBrowserContext(web_contents_->GetBrowserContext()); 541 return Profile::FromBrowserContext(web_contents_->GetBrowserContext());
542 } 542 }
OLDNEW
« no previous file with comments | « no previous file | chrome/common/extensions/api/experimental_font_settings.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698