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

Unified Diff: components/flags_ui/flags_state.cc

Issue 2345033002: Log base::Features in Launch.FlagsAtStartup (Closed)
Patch Set: Created 4 years, 3 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 f7d0eb8233b34927472867ef4525f4c9c54412a5..468074481c30684fb8cb8ce1602ec767c53f68ce 100644
--- a/components/flags_ui/flags_state.cc
+++ b/components/flags_ui/flags_state.cc
@@ -280,8 +280,17 @@ std::set<std::string> FlagsState::GetSwitchesFromFlags(
DCHECK(entry_it != name_to_switch_map.end());
const SwitchEntry& entry = entry_it->second;
- if (!entry.switch_name.empty())
- switches.insert("--" + entry.switch_name);
+ if (!entry.switch_name.empty()) {
Alexei Svitkine (slow) 2016/09/15 19:59:18 Nit: No {}'s if the body is a single line. Please
lawrencewu 2016/09/16 15:34:56 Done.
+ switches.insert(entry.switch_name);
+ }
+
+ if (!entry.feature_name.empty()) {
+ if (entry.feature_state) {
+ switches.insert(entry.feature_name + ":enabled");
+ } else {
+ switches.insert(entry.feature_name + ":disabled");
+ }
+ }
}
return switches;
}

Powered by Google App Engine
This is Rietveld 408576698