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

Side by Side Diff: chrome/common/chrome_switches.cc

Issue 1766273002: Convert --enable-md-history to a feature flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move a feature override for kMaterialDesignHistoryFeature from SetUpCommandLine() to the inner scop… Created 4 years, 9 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/common/chrome_switches.h" 5 #include "chrome/common/chrome_switches.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 10
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 "enable-extension-activity-log-testing"; 419 "enable-extension-activity-log-testing";
420 420
421 // Enable the fast unload controller, which speeds up tab/window close by 421 // Enable the fast unload controller, which speeds up tab/window close by
422 // running a tab's onunload js handler independently of the GUI - 422 // running a tab's onunload js handler independently of the GUI -
423 // crbug.com/142458 . 423 // crbug.com/142458 .
424 const char kEnableFastUnload[] = "enable-fast-unload"; 424 const char kEnableFastUnload[] = "enable-fast-unload";
425 425
426 // Enables the Material Design version of chrome://extensions. 426 // Enables the Material Design version of chrome://extensions.
427 const char kEnableMaterialDesignExtensions[] = "enable-md-extensions"; 427 const char kEnableMaterialDesignExtensions[] = "enable-md-extensions";
428 428
429 // Enables the Material Design version of chrome://history.
430 const char kEnableMaterialDesignHistory[] = "enable-md-history";
431
432 // Enables the Material Design policy page at chrome://md-policy. 429 // Enables the Material Design policy page at chrome://md-policy.
433 const char kEnableMaterialDesignPolicyPage[] = "enable-md-policy-page"; 430 const char kEnableMaterialDesignPolicyPage[] = "enable-md-policy-page";
434 431
435 // Runs the Native Client inside the renderer process and enables GPU plugin 432 // Runs the Native Client inside the renderer process and enables GPU plugin
436 // (internally adds lEnableGpuPlugin to the command line). 433 // (internally adds lEnableGpuPlugin to the command line).
437 const char kEnableNaCl[] = "enable-nacl"; 434 const char kEnableNaCl[] = "enable-nacl";
438 435
439 // Enables the use of native notifications instead of using the Chrome based 436 // Enables the use of native notifications instead of using the Chrome based
440 // ones. 437 // ones.
441 const char kEnableNativeNotifications[] = "enable-native-notifications"; 438 const char kEnableNativeNotifications[] = "enable-native-notifications";
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 685
689 #if !defined(GOOGLE_CHROME_BUILD) 686 #if !defined(GOOGLE_CHROME_BUILD)
690 // Enables a live-reload for local NTP resources. This only works when Chrome 687 // Enables a live-reload for local NTP resources. This only works when Chrome
691 // is running from a Chrome source directory. 688 // is running from a Chrome source directory.
692 const char kLocalNtpReload[] = "local-ntp-reload"; 689 const char kLocalNtpReload[] = "local-ntp-reload";
693 #endif 690 #endif
694 691
695 // Makes Chrome default browser 692 // Makes Chrome default browser
696 const char kMakeDefaultBrowser[] = "make-default-browser"; 693 const char kMakeDefaultBrowser[] = "make-default-browser";
697 694
695 // Enables or disables the Material Design version of chrome:://history.
696 const base::Feature kMaterialDesignHistoryFeature {
697 "UsesMaterialDesignHistory", base::FEATURE_DISABLED_BY_DEFAULT
698 };
699
698 // Forces the maximum disk space to be used by the media cache, in bytes. 700 // Forces the maximum disk space to be used by the media cache, in bytes.
699 const char kMediaCacheSize[] = "media-cache-size"; 701 const char kMediaCacheSize[] = "media-cache-size";
700 702
701 // Enables Media Router. 703 // Enables Media Router.
702 const char kMediaRouter[] = "media-router"; 704 const char kMediaRouter[] = "media-router";
703 705
704 // Enables histograming of tasks served by MessageLoop. See 706 // Enables histograming of tasks served by MessageLoop. See
705 // about:histograms/Loop for results, which show frequency of messages on each 707 // about:histograms/Loop for results, which show frequency of messages on each
706 // thread, including APC count, object signalling count, etc. 708 // thread, including APC count, object signalling count, etc.
707 const char kMessageLoopHistogrammer[] = "message-loop-histogrammer"; 709 const char kMessageLoopHistogrammer[] = "message-loop-histogrammer";
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after
1340 !base::CommandLine::ForCurrentProcess()->HasSwitch( 1342 !base::CommandLine::ForCurrentProcess()->HasSwitch(
1341 ::switches::kDisableAboutInSettings); 1343 ::switches::kDisableAboutInSettings);
1342 } 1344 }
1343 1345
1344 bool MdExtensionsEnabled() { 1346 bool MdExtensionsEnabled() {
1345 return base::CommandLine::ForCurrentProcess()->HasSwitch( 1347 return base::CommandLine::ForCurrentProcess()->HasSwitch(
1346 ::switches::kEnableMaterialDesignExtensions); 1348 ::switches::kEnableMaterialDesignExtensions);
1347 } 1349 }
1348 1350
1349 bool MdHistoryEnabled() { 1351 bool MdHistoryEnabled() {
1350 return base::CommandLine::ForCurrentProcess()->HasSwitch( 1352 return base::FeatureList::IsEnabled(
1351 ::switches::kEnableMaterialDesignHistory); 1353 ::switches::kMaterialDesignHistoryFeature);
1352 } 1354 }
1353 1355
1354 bool MdPolicyPageEnabled() { 1356 bool MdPolicyPageEnabled() {
1355 return base::CommandLine::ForCurrentProcess()->HasSwitch( 1357 return base::CommandLine::ForCurrentProcess()->HasSwitch(
1356 ::switches::kEnableMaterialDesignPolicyPage); 1358 ::switches::kEnableMaterialDesignPolicyPage);
1357 } 1359 }
1358 1360
1359 bool SettingsWindowEnabled() { 1361 bool SettingsWindowEnabled() {
1360 #if defined(OS_CHROMEOS) 1362 #if defined(OS_CHROMEOS)
1361 return !base::CommandLine::ForCurrentProcess()->HasSwitch( 1363 return !base::CommandLine::ForCurrentProcess()->HasSwitch(
(...skipping 24 matching lines...) Expand all
1386 1388
1387 // ----------------------------------------------------------------------------- 1389 // -----------------------------------------------------------------------------
1388 // DO NOT ADD YOUR CRAP TO THE BOTTOM OF THIS FILE. 1390 // DO NOT ADD YOUR CRAP TO THE BOTTOM OF THIS FILE.
1389 // 1391 //
1390 // You were going to just dump your switches here, weren't you? Instead, please 1392 // You were going to just dump your switches here, weren't you? Instead, please
1391 // put them in alphabetical order above, or in order inside the appropriate 1393 // put them in alphabetical order above, or in order inside the appropriate
1392 // ifdef at the bottom. The order should match the header. 1394 // ifdef at the bottom. The order should match the header.
1393 // ----------------------------------------------------------------------------- 1395 // -----------------------------------------------------------------------------
1394 1396
1395 } // namespace switches 1397 } // namespace switches
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698