| Index: chrome/browser/extensions/api/font_settings/font_settings_api.cc
|
| diff --git a/chrome/browser/extensions/api/font_settings/font_settings_api.cc b/chrome/browser/extensions/api/font_settings/font_settings_api.cc
|
| index 7ec693d1d3c02e15e9d0ed6dcb5fdfaf0c85c5cd..722172aac40e64f1163d50231f91e0c8d3109c93 100644
|
| --- a/chrome/browser/extensions/api/font_settings/font_settings_api.cc
|
| +++ b/chrome/browser/extensions/api/font_settings/font_settings_api.cc
|
| @@ -174,8 +174,8 @@ void FontSettingsEventRouter::OnFontNamePrefChanged(
|
| }
|
| font_name = MaybeGetLocalizedFontName(font_name);
|
|
|
| - ListValue args;
|
| - DictionaryValue* dict = new DictionaryValue();
|
| + base::ListValue args;
|
| + base::DictionaryValue* dict = new base::DictionaryValue();
|
| args.Append(dict);
|
| dict->SetString(kFontIdKey, font_name);
|
| dict->SetString(kGenericFamilyKey, generic_family);
|
| @@ -198,8 +198,8 @@ void FontSettingsEventRouter::OnFontPrefChanged(
|
| pref_name.c_str());
|
| CHECK(pref);
|
|
|
| - ListValue args;
|
| - DictionaryValue* dict = new DictionaryValue();
|
| + base::ListValue args;
|
| + base::DictionaryValue* dict = new base::DictionaryValue();
|
| args.Append(dict);
|
| dict->Set(key, pref->GetValue()->DeepCopy());
|
|
|
| @@ -275,7 +275,7 @@ bool FontSettingsGetFontFunction::RunImpl() {
|
| pref_path,
|
| kIncognito);
|
|
|
| - DictionaryValue* result = new DictionaryValue();
|
| + base::DictionaryValue* result = new base::DictionaryValue();
|
| result->SetString(kFontIdKey, font_name);
|
| result->SetString(kLevelOfControlKey, level_of_control);
|
| SetResult(result);
|
| @@ -314,15 +314,17 @@ bool FontSettingsGetFontListFunction::RunImpl() {
|
| }
|
|
|
| void FontSettingsGetFontListFunction::FontListHasLoaded(
|
| - scoped_ptr<ListValue> list) {
|
| + scoped_ptr<base::ListValue> list) {
|
| bool success = CopyFontsToResult(list.get());
|
| SendResponse(success);
|
| }
|
|
|
| -bool FontSettingsGetFontListFunction::CopyFontsToResult(ListValue* fonts) {
|
| - scoped_ptr<ListValue> result(new ListValue());
|
| - for (ListValue::iterator it = fonts->begin(); it != fonts->end(); ++it) {
|
| - ListValue* font_list_value;
|
| +bool FontSettingsGetFontListFunction::CopyFontsToResult(
|
| + base::ListValue* fonts) {
|
| + scoped_ptr<base::ListValue> result(new base::ListValue());
|
| + for (base::ListValue::iterator it = fonts->begin();
|
| + it != fonts->end(); ++it) {
|
| + base::ListValue* font_list_value;
|
| if (!(*it)->GetAsList(&font_list_value)) {
|
| NOTREACHED();
|
| return false;
|
| @@ -340,7 +342,7 @@ bool FontSettingsGetFontListFunction::CopyFontsToResult(ListValue* fonts) {
|
| return false;
|
| }
|
|
|
| - DictionaryValue* font_name = new DictionaryValue();
|
| + base::DictionaryValue* font_name = new base::DictionaryValue();
|
| font_name->Set(kFontIdKey, Value::CreateStringValue(name));
|
| font_name->Set(kDisplayNameKey, Value::CreateStringValue(localized_name));
|
| result->Append(font_name);
|
| @@ -376,7 +378,7 @@ bool GetFontPrefExtensionFunction::RunImpl() {
|
| GetPrefName(),
|
| kIncognito);
|
|
|
| - DictionaryValue* result = new DictionaryValue();
|
| + base::DictionaryValue* result = new base::DictionaryValue();
|
| result->Set(GetKey(), pref->GetValue()->DeepCopy());
|
| result->SetString(kLevelOfControlKey, level_of_control);
|
| SetResult(result);
|
| @@ -389,7 +391,7 @@ bool SetFontPrefExtensionFunction::RunImpl() {
|
| return false;
|
| }
|
|
|
| - DictionaryValue* details = NULL;
|
| + base::DictionaryValue* details = NULL;
|
| EXTENSION_FUNCTION_VALIDATE(args_->GetDictionary(0, &details));
|
|
|
| Value* value;
|
|
|