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

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

Issue 2572063002: FasterLocationReload: Add a field trial flag to enable the feature (Closed)
Patch Set: merge master again Created 4 years 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 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 WebRuntimeFeatures::enableFeatureFromString("CompositeOpaqueFixedPosition", 318 WebRuntimeFeatures::enableFeatureFromString("CompositeOpaqueFixedPosition",
319 false); 319 false);
320 320
321 if (!base::FeatureList::IsEnabled(features::kCompositeOpaqueScrollers)) 321 if (!base::FeatureList::IsEnabled(features::kCompositeOpaqueScrollers))
322 WebRuntimeFeatures::enableFeatureFromString("CompositeOpaqueScrollers", 322 WebRuntimeFeatures::enableFeatureFromString("CompositeOpaqueScrollers",
323 false); 323 false);
324 324
325 if (base::FeatureList::IsEnabled(features::kGenericSensor)) 325 if (base::FeatureList::IsEnabled(features::kGenericSensor))
326 WebRuntimeFeatures::enableGenericSensor(true); 326 WebRuntimeFeatures::enableGenericSensor(true);
327 327
328 if (base::FeatureList::IsEnabled(features::kFasterLocationReload))
329 WebRuntimeFeatures::enableFasterLocationReload(true);
330
328 // Enable features which VrShell depends on. 331 // Enable features which VrShell depends on.
329 if (base::FeatureList::IsEnabled(features::kVrShell)) { 332 if (base::FeatureList::IsEnabled(features::kVrShell)) {
330 WebRuntimeFeatures::enableGamepadExtensions(true); 333 WebRuntimeFeatures::enableGamepadExtensions(true);
331 WebRuntimeFeatures::enableWebVR(true); 334 WebRuntimeFeatures::enableWebVR(true);
332 } 335 }
333 336
334 // Enable explicitly enabled features, and then disable explicitly disabled 337 // Enable explicitly enabled features, and then disable explicitly disabled
335 // ones. 338 // ones.
336 if (command_line.HasSwitch(switches::kEnableBlinkFeatures)) { 339 if (command_line.HasSwitch(switches::kEnableBlinkFeatures)) {
337 std::vector<std::string> enabled_features = base::SplitString( 340 std::vector<std::string> enabled_features = base::SplitString(
338 command_line.GetSwitchValueASCII(switches::kEnableBlinkFeatures), 341 command_line.GetSwitchValueASCII(switches::kEnableBlinkFeatures),
339 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); 342 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
340 for (const std::string& feature : enabled_features) 343 for (const std::string& feature : enabled_features)
341 WebRuntimeFeatures::enableFeatureFromString(feature, true); 344 WebRuntimeFeatures::enableFeatureFromString(feature, true);
342 } 345 }
343 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { 346 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) {
344 std::vector<std::string> disabled_features = base::SplitString( 347 std::vector<std::string> disabled_features = base::SplitString(
345 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), 348 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures),
346 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); 349 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
347 for (const std::string& feature : disabled_features) 350 for (const std::string& feature : disabled_features)
348 WebRuntimeFeatures::enableFeatureFromString(feature, false); 351 WebRuntimeFeatures::enableFeatureFromString(feature, false);
349 } 352 }
350 } 353 }
351 354
352 } // namespace content 355 } // 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