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

Unified Diff: chrome/browser/about_flags.cc

Issue 2946113002: Use FrameIsAd to decide whether to isolate a frame in TopDocumentIsolation mode. (Closed)
Patch Set: Doh... need to also change s/Default/Unspecified/ in chrome_content_browser_client.cc Created 3 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
Index: chrome/browser/about_flags.cc
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 66aee98ae5c4466c673de0ff192f40b2cb3afd12..d5db480719545637d8bf4eb582b745cd9db649dd 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -1078,6 +1078,20 @@ const FeatureEntry::FeatureVariation kOmniboxUIVerticalMarginVariations[] = {
{"14px vertical margin", kOmniboxUIVerticalMargin14px,
arraysize(kOmniboxUIVerticalMargin14px), nullptr}};
+#define DEFINE_TDI_MODE_FEATURE_PARAM(name, value, description) \
+ const FeatureEntry::FeatureParam kTopDocumentIsolationVariations_##name[] = \
+ {{features::kTopDocumentIsolationModeParam, #value}};
+FOR_EACH_TDI_MODE(DEFINE_TDI_MODE_FEATURE_PARAM)
+#undef DEFINE_TDI_MODE_FEATURE_PARAM
+
+const FeatureEntry::FeatureVariation kTopDocumentIsolationVariations[] = {
+#define DEFINE_TDI_MODE_VARIATION(name, value, description) \
+ {"(" #name " - " description ")", kTopDocumentIsolationVariations_##name, \
+ arraysize(kTopDocumentIsolationVariations_##name), nullptr},
+ FOR_EACH_TDI_MODE(DEFINE_TDI_MODE_VARIATION)
+#undef DEFINE_TDI_MODE_VARIATION
+};
+
// RECORDING USER METRICS FOR FLAGS:
// -----------------------------------------------------------------------------
// The first line of the entry is the internal name.
@@ -1939,7 +1953,9 @@ const FeatureEntry kFeatureEntries[] = {
{"enable-top-document-isolation",
flag_descriptions::kTopDocumentIsolationName,
flag_descriptions::kTopDocumentIsolationDescription, kOsAll,
- FEATURE_VALUE_TYPE(features::kTopDocumentIsolation)},
+ FEATURE_WITH_PARAMS_VALUE_TYPE(features::kTopDocumentIsolation,
+ kTopDocumentIsolationVariations,
+ "TopDocumentIsolation")},
{"enable-use-zoom-for-dsf", flag_descriptions::kEnableUseZoomForDsfName,
flag_descriptions::kEnableUseZoomForDsfDescription, kOsAll,
MULTI_VALUE_TYPE(kEnableUseZoomForDSFChoices)},

Powered by Google App Engine
This is Rietveld 408576698