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

Unified Diff: components/flags_ui/flags_state.cc

Issue 2774203002: Migrate about:flags messages to const char* (Closed)
Patch Set: iOS OWNERS Created 3 years, 9 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: components/flags_ui/flags_state.cc
diff --git a/components/flags_ui/flags_state.cc b/components/flags_ui/flags_state.cc
index da1db2c582f2a23d94195ad055ee16ede16c38e7..9046939e61ffcc68a8a9fd12f9deb0543bc4394f 100644
--- a/components/flags_ui/flags_state.cc
+++ b/components/flags_ui/flags_state.cc
@@ -510,9 +510,11 @@ void FlagsState::GetFlagFeatureEntries(
std::unique_ptr<base::DictionaryValue> data(new base::DictionaryValue());
data->SetString("internal_name", entry.internal_name);
- data->SetString("name", l10n_util::GetStringUTF16(entry.visible_name_id));
- data->SetString("description",
- l10n_util::GetStringUTF16(entry.visible_description_id));
+ data->SetString("name",
+ base::UTF8ToUTF16(base::StringPiece(entry.visible_name)));
Alexei Svitkine (slow) 2017/03/27 16:37:29 Looks like SetString() accepts a StringPiece as th
vabr (Chromium) 2017/03/27 18:12:33 Thanks for catching this, it would have been indee
+ data->SetString(
+ "description",
+ base::UTF8ToUTF16(base::StringPiece(entry.visible_description)));
base::ListValue* supported_platforms = new base::ListValue();
AddOsStrings(entry.supported_platforms, supported_platforms);

Powered by Google App Engine
This is Rietveld 408576698