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

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

Issue 2393193003: 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 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 "FramebustingNeedsSameOriginOrUserGesture", 280 "FramebustingNeedsSameOriginOrUserGesture",
281 base::FeatureList::IsEnabled( 281 base::FeatureList::IsEnabled(
282 features::kFramebustingNeedsSameOriginOrUserGesture)); 282 features::kFramebustingNeedsSameOriginOrUserGesture));
283 283
284 if (base::FeatureList::IsEnabled(features::kParseHTMLOnMainThread)) 284 if (base::FeatureList::IsEnabled(features::kParseHTMLOnMainThread))
285 WebRuntimeFeatures::enableFeatureFromString("ParseHTMLOnMainThread", true); 285 WebRuntimeFeatures::enableFeatureFromString("ParseHTMLOnMainThread", true);
286 286
287 if (command_line.HasSwitch(switches::kDisableBackgroundTimerThrottling)) 287 if (command_line.HasSwitch(switches::kDisableBackgroundTimerThrottling))
288 WebRuntimeFeatures::enableTimerThrottlingForBackgroundTabs(false); 288 WebRuntimeFeatures::enableTimerThrottlingForBackgroundTabs(false);
289 289
290 WebRuntimeFeatures::enableExpensiveBackgroundTimerThrottling(
291 base::FeatureList::IsEnabled(
292 features::kExpensiveBackgroundTimerThrottling));
293
294 WebRuntimeFeatures::enableRenderingPipelineThrottling( 290 WebRuntimeFeatures::enableRenderingPipelineThrottling(
295 base::FeatureList::IsEnabled(features::kRenderingPipelineThrottling)); 291 base::FeatureList::IsEnabled(features::kRenderingPipelineThrottling));
296 292
297 WebRuntimeFeatures::enableTimerThrottlingForHiddenFrames( 293 WebRuntimeFeatures::enableTimerThrottlingForHiddenFrames(
298 base::FeatureList::IsEnabled(features::kTimerThrottlingForHiddenFrames)); 294 base::FeatureList::IsEnabled(features::kTimerThrottlingForHiddenFrames));
299 295
300 if (base::FeatureList::IsEnabled( 296 if (base::FeatureList::IsEnabled(
301 features::kSendBeaconThrowForBlobWithNonSimpleType)) 297 features::kSendBeaconThrowForBlobWithNonSimpleType))
302 WebRuntimeFeatures::enableSendBeaconThrowForBlobWithNonSimpleType(true); 298 WebRuntimeFeatures::enableSendBeaconThrowForBlobWithNonSimpleType(true);
303 299
(...skipping 24 matching lines...) Expand all
328 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { 324 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) {
329 std::vector<std::string> disabled_features = base::SplitString( 325 std::vector<std::string> disabled_features = base::SplitString(
330 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), 326 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures),
331 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); 327 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
332 for (const std::string& feature : disabled_features) 328 for (const std::string& feature : disabled_features)
333 WebRuntimeFeatures::enableFeatureFromString(feature, false); 329 WebRuntimeFeatures::enableFeatureFromString(feature, false);
334 } 330 }
335 } 331 }
336 332
337 } // namespace content 333 } // 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