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

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

Issue 2865013002: Add an experimental flag to change location.reload to take a hard-reload (Closed)
Patch Set: Created 3 years, 7 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/flag_descriptions.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 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 } 366 }
367 367
368 if (base::FeatureList::IsEnabled(features::kLoadingWithMojo)) 368 if (base::FeatureList::IsEnabled(features::kLoadingWithMojo))
369 WebRuntimeFeatures::EnableLoadingWithMojo(true); 369 WebRuntimeFeatures::EnableLoadingWithMojo(true);
370 370
371 if (!base::FeatureList::IsEnabled(features::kBlockCredentialedSubresources)) { 371 if (!base::FeatureList::IsEnabled(features::kBlockCredentialedSubresources)) {
372 WebRuntimeFeatures::EnableFeatureFromString("BlockCredentialedSubresources", 372 WebRuntimeFeatures::EnableFeatureFromString("BlockCredentialedSubresources",
373 false); 373 false);
374 } 374 }
375 375
376 WebRuntimeFeatures::EnableLocationHardReload(
377 base::FeatureList::IsEnabled(features::kLocationHardReload));
378
376 // Enable explicitly enabled features, and then disable explicitly disabled 379 // Enable explicitly enabled features, and then disable explicitly disabled
377 // ones. 380 // ones.
378 if (command_line.HasSwitch(switches::kEnableBlinkFeatures)) { 381 if (command_line.HasSwitch(switches::kEnableBlinkFeatures)) {
379 std::vector<std::string> enabled_features = base::SplitString( 382 std::vector<std::string> enabled_features = base::SplitString(
380 command_line.GetSwitchValueASCII(switches::kEnableBlinkFeatures), 383 command_line.GetSwitchValueASCII(switches::kEnableBlinkFeatures),
381 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); 384 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
382 for (const std::string& feature : enabled_features) 385 for (const std::string& feature : enabled_features)
383 WebRuntimeFeatures::EnableFeatureFromString(feature, true); 386 WebRuntimeFeatures::EnableFeatureFromString(feature, true);
384 } 387 }
385 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { 388 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) {
386 std::vector<std::string> disabled_features = base::SplitString( 389 std::vector<std::string> disabled_features = base::SplitString(
387 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), 390 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures),
388 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); 391 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
389 for (const std::string& feature : disabled_features) 392 for (const std::string& feature : disabled_features)
390 WebRuntimeFeatures::EnableFeatureFromString(feature, false); 393 WebRuntimeFeatures::EnableFeatureFromString(feature, false);
391 } 394 }
392 } 395 }
393 396
394 } // namespace content 397 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/flag_descriptions.cc ('k') | content/public/common/content_features.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698