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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/about_flags.h" 5 #include "chrome/browser/about_flags.h"
6 6
7 #include <iterator> 7 #include <iterator>
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <utility> 10 #include <utility>
(...skipping 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after
1071 arraysize(kOmniboxUIVerticalMargin6px), nullptr}, 1071 arraysize(kOmniboxUIVerticalMargin6px), nullptr},
1072 {"8px vertical margin", kOmniboxUIVerticalMargin8px, 1072 {"8px vertical margin", kOmniboxUIVerticalMargin8px,
1073 arraysize(kOmniboxUIVerticalMargin8px), nullptr}, 1073 arraysize(kOmniboxUIVerticalMargin8px), nullptr},
1074 {"10px vertical margin", kOmniboxUIVerticalMargin10px, 1074 {"10px vertical margin", kOmniboxUIVerticalMargin10px,
1075 arraysize(kOmniboxUIVerticalMargin10px), nullptr}, 1075 arraysize(kOmniboxUIVerticalMargin10px), nullptr},
1076 {"12px vertical margin", kOmniboxUIVerticalMargin12px, 1076 {"12px vertical margin", kOmniboxUIVerticalMargin12px,
1077 arraysize(kOmniboxUIVerticalMargin12px), nullptr}, 1077 arraysize(kOmniboxUIVerticalMargin12px), nullptr},
1078 {"14px vertical margin", kOmniboxUIVerticalMargin14px, 1078 {"14px vertical margin", kOmniboxUIVerticalMargin14px,
1079 arraysize(kOmniboxUIVerticalMargin14px), nullptr}}; 1079 arraysize(kOmniboxUIVerticalMargin14px), nullptr}};
1080 1080
1081 #define DEFINE_TDI_MODE_FEATURE_PARAM(name, value, description) \
1082 const FeatureEntry::FeatureParam kTopDocumentIsolationVariations_##name[] = \
1083 {{features::kTopDocumentIsolationModeParam, #value}};
1084 FOR_EACH_TDI_MODE(DEFINE_TDI_MODE_FEATURE_PARAM)
1085 #undef DEFINE_TDI_MODE_FEATURE_PARAM
1086
1087 const FeatureEntry::FeatureVariation kTopDocumentIsolationVariations[] = {
1088 #define DEFINE_TDI_MODE_VARIATION(name, value, description) \
1089 {"(" #name " - " description ")", kTopDocumentIsolationVariations_##name, \
1090 arraysize(kTopDocumentIsolationVariations_##name), nullptr},
1091 FOR_EACH_TDI_MODE(DEFINE_TDI_MODE_VARIATION)
1092 #undef DEFINE_TDI_MODE_VARIATION
1093 };
1094
1081 // RECORDING USER METRICS FOR FLAGS: 1095 // RECORDING USER METRICS FOR FLAGS:
1082 // ----------------------------------------------------------------------------- 1096 // -----------------------------------------------------------------------------
1083 // The first line of the entry is the internal name. 1097 // The first line of the entry is the internal name.
1084 // 1098 //
1085 // To add a new entry, add to the end of kFeatureEntries. There are two 1099 // To add a new entry, add to the end of kFeatureEntries. There are two
1086 // distinct types of entries: 1100 // distinct types of entries:
1087 // . SINGLE_VALUE: entry is either on or off. Use the SINGLE_VALUE_TYPE 1101 // . SINGLE_VALUE: entry is either on or off. Use the SINGLE_VALUE_TYPE
1088 // macro for this type supplying the command line to the macro. 1102 // macro for this type supplying the command line to the macro.
1089 // . MULTI_VALUE: a list of choices, the first of which should correspond to a 1103 // . MULTI_VALUE: a list of choices, the first of which should correspond to a
1090 // deactivated state for this lab (i.e. no command line option). To specify 1104 // deactivated state for this lab (i.e. no command line option). To specify
(...skipping 841 matching lines...) Expand 10 before | Expand all | Expand 10 after
1932 MULTI_VALUE_TYPE(kMarkHttpAsChoices)}, 1946 MULTI_VALUE_TYPE(kMarkHttpAsChoices)},
1933 {"enable-http-form-warning", flag_descriptions::kEnableHttpFormWarningName, 1947 {"enable-http-form-warning", flag_descriptions::kEnableHttpFormWarningName,
1934 flag_descriptions::kEnableHttpFormWarningDescription, kOsAll, 1948 flag_descriptions::kEnableHttpFormWarningDescription, kOsAll,
1935 FEATURE_VALUE_TYPE(security_state::kHttpFormWarningFeature)}, 1949 FEATURE_VALUE_TYPE(security_state::kHttpFormWarningFeature)},
1936 {"enable-site-per-process", flag_descriptions::kSitePerProcessName, 1950 {"enable-site-per-process", flag_descriptions::kSitePerProcessName,
1937 flag_descriptions::kSitePerProcessDescription, kOsAll, 1951 flag_descriptions::kSitePerProcessDescription, kOsAll,
1938 SINGLE_VALUE_TYPE(switches::kSitePerProcess)}, 1952 SINGLE_VALUE_TYPE(switches::kSitePerProcess)},
1939 {"enable-top-document-isolation", 1953 {"enable-top-document-isolation",
1940 flag_descriptions::kTopDocumentIsolationName, 1954 flag_descriptions::kTopDocumentIsolationName,
1941 flag_descriptions::kTopDocumentIsolationDescription, kOsAll, 1955 flag_descriptions::kTopDocumentIsolationDescription, kOsAll,
1942 FEATURE_VALUE_TYPE(features::kTopDocumentIsolation)}, 1956 FEATURE_WITH_PARAMS_VALUE_TYPE(features::kTopDocumentIsolation,
1957 kTopDocumentIsolationVariations,
1958 "TopDocumentIsolation")},
1943 {"enable-use-zoom-for-dsf", flag_descriptions::kEnableUseZoomForDsfName, 1959 {"enable-use-zoom-for-dsf", flag_descriptions::kEnableUseZoomForDsfName,
1944 flag_descriptions::kEnableUseZoomForDsfDescription, kOsAll, 1960 flag_descriptions::kEnableUseZoomForDsfDescription, kOsAll,
1945 MULTI_VALUE_TYPE(kEnableUseZoomForDSFChoices)}, 1961 MULTI_VALUE_TYPE(kEnableUseZoomForDSFChoices)},
1946 #if defined(OS_MACOSX) 1962 #if defined(OS_MACOSX)
1947 {"enable-harfbuzz-rendertext", flag_descriptions::kHarfbuzzRendertextName, 1963 {"enable-harfbuzz-rendertext", flag_descriptions::kHarfbuzzRendertextName,
1948 flag_descriptions::kHarfbuzzRendertextDescription, kOsMac, 1964 flag_descriptions::kHarfbuzzRendertextDescription, kOsMac,
1949 SINGLE_VALUE_TYPE(switches::kEnableHarfBuzzRenderText)}, 1965 SINGLE_VALUE_TYPE(switches::kEnableHarfBuzzRenderText)},
1950 #endif // OS_MACOSX 1966 #endif // OS_MACOSX
1951 {"data-reduction-proxy-lo-fi", 1967 {"data-reduction-proxy-lo-fi",
1952 flag_descriptions::kDataReductionProxyLoFiName, 1968 flag_descriptions::kDataReductionProxyLoFiName,
(...skipping 1392 matching lines...) Expand 10 before | Expand all | Expand 10 after
3345 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; 3361 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0;
3346 3362
3347 const FeatureEntry* GetFeatureEntries(size_t* count) { 3363 const FeatureEntry* GetFeatureEntries(size_t* count) {
3348 *count = arraysize(kFeatureEntries); 3364 *count = arraysize(kFeatureEntries);
3349 return kFeatureEntries; 3365 return kFeatureEntries;
3350 } 3366 }
3351 3367
3352 } // namespace testing 3368 } // namespace testing
3353 3369
3354 } // namespace about_flags 3370 } // namespace about_flags
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698