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

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

Issue 2000063005: [WIP] Speculatively launch Service Workers on mouse/touch events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 WebRuntimeFeatures::enableFeatureFromString( 227 WebRuntimeFeatures::enableFeatureFromString(
228 "FontCacheScaling", 228 "FontCacheScaling",
229 base::FeatureList::IsEnabled(features::kFontCacheScaling)); 229 base::FeatureList::IsEnabled(features::kFontCacheScaling));
230 230
231 if (!base::FeatureList::IsEnabled(features::kPaintOptimizations)) 231 if (!base::FeatureList::IsEnabled(features::kPaintOptimizations))
232 WebRuntimeFeatures::enableFeatureFromString("PaintOptimizations", false); 232 WebRuntimeFeatures::enableFeatureFromString("PaintOptimizations", false);
233 233
234 WebRuntimeFeatures::enableRenderingPipelineThrottling( 234 WebRuntimeFeatures::enableRenderingPipelineThrottling(
235 base::FeatureList::IsEnabled(features::kRenderingPipelineThrottling)); 235 base::FeatureList::IsEnabled(features::kRenderingPipelineThrottling));
236 236
237 if (base::FeatureList::IsEnabled(features::kSpeculativeLaunchServiceWorker))
238 WebRuntimeFeatures::enableSpeculativeLaunchServiceWorker(true);
239
237 // Enable explicitly enabled features, and then disable explicitly disabled 240 // Enable explicitly enabled features, and then disable explicitly disabled
238 // ones. 241 // ones.
239 if (command_line.HasSwitch(switches::kEnableBlinkFeatures)) { 242 if (command_line.HasSwitch(switches::kEnableBlinkFeatures)) {
240 std::vector<std::string> enabled_features = base::SplitString( 243 std::vector<std::string> enabled_features = base::SplitString(
241 command_line.GetSwitchValueASCII(switches::kEnableBlinkFeatures), 244 command_line.GetSwitchValueASCII(switches::kEnableBlinkFeatures),
242 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); 245 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
243 for (const std::string& feature : enabled_features) 246 for (const std::string& feature : enabled_features)
244 WebRuntimeFeatures::enableFeatureFromString(feature, true); 247 WebRuntimeFeatures::enableFeatureFromString(feature, true);
245 } 248 }
246 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { 249 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) {
247 std::vector<std::string> disabled_features = base::SplitString( 250 std::vector<std::string> disabled_features = base::SplitString(
248 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), 251 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures),
249 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); 252 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
250 for (const std::string& feature : disabled_features) 253 for (const std::string& feature : disabled_features)
251 WebRuntimeFeatures::enableFeatureFromString(feature, false); 254 WebRuntimeFeatures::enableFeatureFromString(feature, false);
252 } 255 }
253 } 256 }
254 257
255 } // namespace content 258 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/service_worker/service_worker_version.cc ('k') | content/public/browser/service_worker_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698