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

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

Issue 2409653003: [Merge to 2883] Revert "[scheduler] Throttle background frames with 1% CPU limit" (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | content/public/common/content_features.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 "FramebustingNeedsSameOriginOrUserGesture", 274 "FramebustingNeedsSameOriginOrUserGesture",
275 base::FeatureList::IsEnabled( 275 base::FeatureList::IsEnabled(
276 features::kFramebustingNeedsSameOriginOrUserGesture)); 276 features::kFramebustingNeedsSameOriginOrUserGesture));
277 277
278 if (base::FeatureList::IsEnabled(features::kParseHTMLOnMainThread)) 278 if (base::FeatureList::IsEnabled(features::kParseHTMLOnMainThread))
279 WebRuntimeFeatures::enableFeatureFromString("ParseHTMLOnMainThread", true); 279 WebRuntimeFeatures::enableFeatureFromString("ParseHTMLOnMainThread", true);
280 280
281 if (command_line.HasSwitch(switches::kDisableBackgroundTimerThrottling)) 281 if (command_line.HasSwitch(switches::kDisableBackgroundTimerThrottling))
282 WebRuntimeFeatures::enableTimerThrottlingForBackgroundTabs(false); 282 WebRuntimeFeatures::enableTimerThrottlingForBackgroundTabs(false);
283 283
284 WebRuntimeFeatures::enableExpensiveBackgroundTimerThrottling(
285 base::FeatureList::IsEnabled(
286 features::kExpensiveBackgroundTimerThrottling));
287
288 WebRuntimeFeatures::enableRenderingPipelineThrottling( 284 WebRuntimeFeatures::enableRenderingPipelineThrottling(
289 base::FeatureList::IsEnabled(features::kRenderingPipelineThrottling)); 285 base::FeatureList::IsEnabled(features::kRenderingPipelineThrottling));
290 286
291 WebRuntimeFeatures::enableTimerThrottlingForHiddenFrames( 287 WebRuntimeFeatures::enableTimerThrottlingForHiddenFrames(
292 base::FeatureList::IsEnabled(features::kTimerThrottlingForHiddenFrames)); 288 base::FeatureList::IsEnabled(features::kTimerThrottlingForHiddenFrames));
293 289
294 if (base::FeatureList::IsEnabled( 290 if (base::FeatureList::IsEnabled(
295 features::kSendBeaconThrowForBlobWithNonSimpleType)) 291 features::kSendBeaconThrowForBlobWithNonSimpleType))
296 WebRuntimeFeatures::enableSendBeaconThrowForBlobWithNonSimpleType(true); 292 WebRuntimeFeatures::enableSendBeaconThrowForBlobWithNonSimpleType(true);
297 293
(...skipping 24 matching lines...) Expand all
322 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { 318 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) {
323 std::vector<std::string> disabled_features = base::SplitString( 319 std::vector<std::string> disabled_features = base::SplitString(
324 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), 320 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures),
325 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); 321 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
326 for (const std::string& feature : disabled_features) 322 for (const std::string& feature : disabled_features)
327 WebRuntimeFeatures::enableFeatureFromString(feature, false); 323 WebRuntimeFeatures::enableFeatureFromString(feature, false);
328 } 324 }
329 } 325 }
330 326
331 } // namespace content 327 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | content/public/common/content_features.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698