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

Side by Side Diff: content/child/runtime_features.cc

Issue 2279543004: [DocWriteBlocking] Add feature to block doc.written scripts if 2g-like network (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/child/runtime_features.h" 5 #include "content/child/runtime_features.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/feature_list.h" 10 #include "base/feature_list.h"
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 WebRuntimeFeatures::enableScrollAnchoring(true); 225 WebRuntimeFeatures::enableScrollAnchoring(true);
226 226
227 if (command_line.HasSwitch(switches::kEnableSlimmingPaintV2)) 227 if (command_line.HasSwitch(switches::kEnableSlimmingPaintV2))
228 WebRuntimeFeatures::enableSlimmingPaintV2(true); 228 WebRuntimeFeatures::enableSlimmingPaintV2(true);
229 229
230 // Note that it might already by true for OS_ANDROID, above. This is for 230 // Note that it might already by true for OS_ANDROID, above. This is for
231 // non-android versions. 231 // non-android versions.
232 if (base::FeatureList::IsEnabled(features::kNewMediaPlaybackUi)) 232 if (base::FeatureList::IsEnabled(features::kNewMediaPlaybackUi))
233 WebRuntimeFeatures::enableNewMediaPlaybackUi(true); 233 WebRuntimeFeatures::enableNewMediaPlaybackUi(true);
234 234
235 if (base::FeatureList::IsEnabled(features::kBlockDocWriteIfEffectively2G)) {
236 WebRuntimeFeatures::enableBlockDocWriteIfEffectively2G(true);
237 }
238
235 if (base::FeatureList::IsEnabled(features::kDocumentWriteEvaluator)) 239 if (base::FeatureList::IsEnabled(features::kDocumentWriteEvaluator))
236 WebRuntimeFeatures::enableDocumentWriteEvaluator(true); 240 WebRuntimeFeatures::enableDocumentWriteEvaluator(true);
237 241
238 WebRuntimeFeatures::enableMediaDocumentDownloadButton( 242 WebRuntimeFeatures::enableMediaDocumentDownloadButton(
239 base::FeatureList::IsEnabled(features::kMediaDocumentDownloadButton)); 243 base::FeatureList::IsEnabled(features::kMediaDocumentDownloadButton));
240 244
241 if (base::FeatureList::IsEnabled(features::kPointerEvents)) 245 if (base::FeatureList::IsEnabled(features::kPointerEvents))
242 WebRuntimeFeatures::enablePointerEvent(true); 246 WebRuntimeFeatures::enablePointerEvent(true);
243 247
244 if (base::FeatureList::IsEnabled(features::kPassiveDocumentEventListeners)) 248 if (base::FeatureList::IsEnabled(features::kPassiveDocumentEventListeners))
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { 291 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) {
288 std::vector<std::string> disabled_features = base::SplitString( 292 std::vector<std::string> disabled_features = base::SplitString(
289 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), 293 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures),
290 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); 294 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
291 for (const std::string& feature : disabled_features) 295 for (const std::string& feature : disabled_features)
292 WebRuntimeFeatures::enableFeatureFromString(feature, false); 296 WebRuntimeFeatures::enableFeatureFromString(feature, false);
293 } 297 }
294 } 298 }
295 299
296 } // namespace content 300 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/public/common/content_features.h » ('j') | third_party/WebKit/Source/core/loader/FrameFetchContext.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698