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

Unified Diff: chrome/browser/extensions/extension_font_settings_api.cc

Issue 10716003: [Font Settings API]: Rename fontName and localizedName to fontId and displayName (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch for landing 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/common/extensions/api/experimental_font_settings.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_font_settings_api.cc
diff --git a/chrome/browser/extensions/extension_font_settings_api.cc b/chrome/browser/extensions/extension_font_settings_api.cc
index 32d91d0d7db5b76b679e3ec0411b9bf6232f8d35..0d29ef261b60336c628864affc33a2ecdffde8f9 100644
--- a/chrome/browser/extensions/extension_font_settings_api.cc
+++ b/chrome/browser/extensions/extension_font_settings_api.cc
@@ -36,10 +36,10 @@ namespace fonts = extensions::api::experimental_font_settings;
namespace {
-const char kFontNameKey[] = "fontName";
+const char kFontIdKey[] = "fontId";
const char kGenericFamilyKey[] = "genericFamily";
const char kLevelOfControlKey[] = "levelOfControl";
-const char kLocalizedNameKey[] = "localizedName";
+const char kDisplayNameKey[] = "displayName";
const char kPixelSizeKey[] = "pixelSize";
const char kScriptKey[] = "script";
@@ -204,7 +204,7 @@ void ExtensionFontSettingsEventRouter::OnFontNamePrefChanged(
ListValue args;
DictionaryValue* dict = new DictionaryValue();
args.Append(dict);
- dict->SetString(kFontNameKey, font_name);
+ dict->SetString(kFontIdKey, font_name);
dict->SetString(kGenericFamilyKey, generic_family);
dict->SetString(kScriptKey, script);
@@ -292,7 +292,7 @@ bool GetFontFunction::RunImpl() {
kIncognito);
DictionaryValue* result = new DictionaryValue();
- result->SetString(kFontNameKey, font_name);
+ result->SetString(kFontIdKey, font_name);
result->SetString(kLevelOfControlKey, level_of_control);
result_.reset(result);
return true;
@@ -320,7 +320,7 @@ bool SetFontFunction::RunImpl() {
extension_id(),
pref_path.c_str(),
extensions::kExtensionPrefsScopeRegular,
- Value::CreateStringValue(params->details.font_name));
+ Value::CreateStringValue(params->details.font_id));
return true;
}
@@ -357,8 +357,8 @@ bool GetFontListFunction::CopyFontsToResult(ListValue* fonts) {
}
DictionaryValue* font_name = new DictionaryValue();
- font_name->Set(kFontNameKey, Value::CreateStringValue(name));
- font_name->Set(kLocalizedNameKey, Value::CreateStringValue(localized_name));
+ font_name->Set(kFontIdKey, Value::CreateStringValue(name));
+ font_name->Set(kDisplayNameKey, Value::CreateStringValue(localized_name));
result->Append(font_name);
}
« 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