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

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: Addressing 2 more CR comments from csharrison@. 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 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after
1094 arraysize(kClientPlaceholdersForServerLoFiEnabled), nullptr}}; 1094 arraysize(kClientPlaceholdersForServerLoFiEnabled), nullptr}};
1095 1095
1096 const FeatureEntry::Choice kAsyncImageDecodingChoices[] = { 1096 const FeatureEntry::Choice kAsyncImageDecodingChoices[] = {
1097 {flags_ui::kGenericExperimentChoiceDefault, "", ""}, 1097 {flags_ui::kGenericExperimentChoiceDefault, "", ""},
1098 {flags_ui::kGenericExperimentChoiceEnabled, 1098 {flags_ui::kGenericExperimentChoiceEnabled,
1099 cc::switches::kEnableCheckerImaging, ""}, 1099 cc::switches::kEnableCheckerImaging, ""},
1100 {flags_ui::kGenericExperimentChoiceDisabled, 1100 {flags_ui::kGenericExperimentChoiceDisabled,
1101 cc::switches::kDisableCheckerImaging, ""}, 1101 cc::switches::kDisableCheckerImaging, ""},
1102 }; 1102 };
1103 1103
1104 #define DEFINE_TDI_MODE_FEATURE_PARAM(name, value, description) \
1105 const FeatureEntry::FeatureParam kTopDocumentIsolationVariations_##name[] = \
1106 {{features::kTopDocumentIsolationModeParam, #value}};
1107 FOR_EACH_TDI_MODE(DEFINE_TDI_MODE_FEATURE_PARAM)
1108 #undef DEFINE_TDI_MODE_FEATURE_PARAM
1109
1110 const FeatureEntry::FeatureVariation kTopDocumentIsolationVariations[] = {
1111 #define DEFINE_TDI_MODE_VARIATION(name, value, description) \
1112 {"(" #name " - " description ")", kTopDocumentIsolationVariations_##name, \
1113 arraysize(kTopDocumentIsolationVariations_##name), nullptr},
1114 FOR_EACH_TDI_MODE(DEFINE_TDI_MODE_VARIATION)
1115 #undef DEFINE_TDI_MODE_VARIATION
1116 };
1117
1104 // RECORDING USER METRICS FOR FLAGS: 1118 // RECORDING USER METRICS FOR FLAGS:
1105 // ----------------------------------------------------------------------------- 1119 // -----------------------------------------------------------------------------
1106 // The first line of the entry is the internal name. 1120 // The first line of the entry is the internal name.
1107 // 1121 //
1108 // To add a new entry, add to the end of kFeatureEntries. There are two 1122 // To add a new entry, add to the end of kFeatureEntries. There are two
1109 // distinct types of entries: 1123 // distinct types of entries:
1110 // . SINGLE_VALUE: entry is either on or off. Use the SINGLE_VALUE_TYPE 1124 // . SINGLE_VALUE: entry is either on or off. Use the SINGLE_VALUE_TYPE
1111 // macro for this type supplying the command line to the macro. 1125 // macro for this type supplying the command line to the macro.
1112 // . MULTI_VALUE: a list of choices, the first of which should correspond to a 1126 // . MULTI_VALUE: a list of choices, the first of which should correspond to a
1113 // deactivated state for this lab (i.e. no command line option). To specify 1127 // deactivated state for this lab (i.e. no command line option). To specify
(...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after
1951 MULTI_VALUE_TYPE(kMarkHttpAsChoices)}, 1965 MULTI_VALUE_TYPE(kMarkHttpAsChoices)},
1952 {"enable-http-form-warning", flag_descriptions::kEnableHttpFormWarningName, 1966 {"enable-http-form-warning", flag_descriptions::kEnableHttpFormWarningName,
1953 flag_descriptions::kEnableHttpFormWarningDescription, kOsAll, 1967 flag_descriptions::kEnableHttpFormWarningDescription, kOsAll,
1954 FEATURE_VALUE_TYPE(security_state::kHttpFormWarningFeature)}, 1968 FEATURE_VALUE_TYPE(security_state::kHttpFormWarningFeature)},
1955 {"enable-site-per-process", flag_descriptions::kSitePerProcessName, 1969 {"enable-site-per-process", flag_descriptions::kSitePerProcessName,
1956 flag_descriptions::kSitePerProcessDescription, kOsAll, 1970 flag_descriptions::kSitePerProcessDescription, kOsAll,
1957 SINGLE_VALUE_TYPE(switches::kSitePerProcess)}, 1971 SINGLE_VALUE_TYPE(switches::kSitePerProcess)},
1958 {"enable-top-document-isolation", 1972 {"enable-top-document-isolation",
1959 flag_descriptions::kTopDocumentIsolationName, 1973 flag_descriptions::kTopDocumentIsolationName,
1960 flag_descriptions::kTopDocumentIsolationDescription, kOsAll, 1974 flag_descriptions::kTopDocumentIsolationDescription, kOsAll,
1961 FEATURE_VALUE_TYPE(features::kTopDocumentIsolation)}, 1975 FEATURE_WITH_PARAMS_VALUE_TYPE(features::kTopDocumentIsolation,
1976 kTopDocumentIsolationVariations,
1977 "TopDocumentIsolation")},
1962 {"enable-use-zoom-for-dsf", flag_descriptions::kEnableUseZoomForDsfName, 1978 {"enable-use-zoom-for-dsf", flag_descriptions::kEnableUseZoomForDsfName,
1963 flag_descriptions::kEnableUseZoomForDsfDescription, kOsAll, 1979 flag_descriptions::kEnableUseZoomForDsfDescription, kOsAll,
1964 MULTI_VALUE_TYPE(kEnableUseZoomForDSFChoices)}, 1980 MULTI_VALUE_TYPE(kEnableUseZoomForDSFChoices)},
1965 #if defined(OS_MACOSX) 1981 #if defined(OS_MACOSX)
1966 {"enable-harfbuzz-rendertext", flag_descriptions::kHarfbuzzRendertextName, 1982 {"enable-harfbuzz-rendertext", flag_descriptions::kHarfbuzzRendertextName,
1967 flag_descriptions::kHarfbuzzRendertextDescription, kOsMac, 1983 flag_descriptions::kHarfbuzzRendertextDescription, kOsMac,
1968 SINGLE_VALUE_TYPE(switches::kEnableHarfBuzzRenderText)}, 1984 SINGLE_VALUE_TYPE(switches::kEnableHarfBuzzRenderText)},
1969 #endif // OS_MACOSX 1985 #endif // OS_MACOSX
1970 {"data-reduction-proxy-lo-fi", 1986 {"data-reduction-proxy-lo-fi",
1971 flag_descriptions::kDataReductionProxyLoFiName, 1987 flag_descriptions::kDataReductionProxyLoFiName,
(...skipping 1439 matching lines...) Expand 10 before | Expand all | Expand 10 after
3411 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; 3427 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0;
3412 3428
3413 const FeatureEntry* GetFeatureEntries(size_t* count) { 3429 const FeatureEntry* GetFeatureEntries(size_t* count) {
3414 *count = arraysize(kFeatureEntries); 3430 *count = arraysize(kFeatureEntries);
3415 return kFeatureEntries; 3431 return kFeatureEntries;
3416 } 3432 }
3417 3433
3418 } // namespace testing 3434 } // namespace testing
3419 3435
3420 } // namespace about_flags 3436 } // namespace about_flags
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698