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

Side by Side Diff: chrome/browser/about_flags.cc

Issue 299703016: Gate disabling nacl code on proper gyp flags, etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix guard on flags code Created 6 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 | Annotate | Revision Log
« no previous file with comments | « build/filename_rules.gypi ('k') | components/nacl/loader/nacl_main.cc » ('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 (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/browser/about_flags.h" 5 #include "chrome/browser/about_flags.h"
6 6
7 #include <iterator> 7 #include <iterator>
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <utility> 10 #include <utility>
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, "", "" }, 169 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, "", "" },
170 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, 170 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
171 switches::kOverscrollHistoryNavigation, 171 switches::kOverscrollHistoryNavigation,
172 "0" }, 172 "0" },
173 { IDS_OVERSCROLL_HISTORY_NAVIGATION_SIMPLE_UI, 173 { IDS_OVERSCROLL_HISTORY_NAVIGATION_SIMPLE_UI,
174 switches::kOverscrollHistoryNavigation, 174 switches::kOverscrollHistoryNavigation,
175 "2" } 175 "2" }
176 }; 176 };
177 #endif 177 #endif
178 178
179 #if !defined(DISABLE_NACL)
179 const Experiment::Choice kNaClDebugMaskChoices[] = { 180 const Experiment::Choice kNaClDebugMaskChoices[] = {
180 // Secure shell can be used on ChromeOS for forwarding the TCP port opened by 181 // Secure shell can be used on ChromeOS for forwarding the TCP port opened by
181 // debug stub to a remote machine. Since secure shell uses NaCl, we usually 182 // debug stub to a remote machine. Since secure shell uses NaCl, we usually
182 // want to avoid debugging that. The PNaCl translator is also a NaCl module, 183 // want to avoid debugging that. The PNaCl translator is also a NaCl module,
183 // so by default we want to avoid debugging that. 184 // so by default we want to avoid debugging that.
184 // NOTE: As the default value must be the empty string, the mask excluding 185 // NOTE: As the default value must be the empty string, the mask excluding
185 // the PNaCl translator and secure shell is substituted elsewhere. 186 // the PNaCl translator and secure shell is substituted elsewhere.
186 { IDS_NACL_DEBUG_MASK_CHOICE_EXCLUDE_UTILS_PNACL, "", "" }, 187 { IDS_NACL_DEBUG_MASK_CHOICE_EXCLUDE_UTILS_PNACL, "", "" },
187 { IDS_NACL_DEBUG_MASK_CHOICE_DEBUG_ALL, switches::kNaClDebugMask, "*://*" }, 188 { IDS_NACL_DEBUG_MASK_CHOICE_DEBUG_ALL, switches::kNaClDebugMask, "*://*" },
188 { IDS_NACL_DEBUG_MASK_CHOICE_INCLUDE_DEBUG, 189 { IDS_NACL_DEBUG_MASK_CHOICE_INCLUDE_DEBUG,
189 switches::kNaClDebugMask, "*://*/*debug.nmf" } 190 switches::kNaClDebugMask, "*://*/*debug.nmf" }
190 }; 191 };
192 #endif
191 193
192 const Experiment::Choice kImplSidePaintingChoices[] = { 194 const Experiment::Choice kImplSidePaintingChoices[] = {
193 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, 195 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
194 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED, 196 { IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED,
195 switches::kEnableImplSidePainting, ""}, 197 switches::kEnableImplSidePainting, ""},
196 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, 198 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
197 switches::kDisableImplSidePainting, ""} 199 switches::kDisableImplSidePainting, ""}
198 }; 200 };
199 201
200 const Experiment::Choice kLCDTextChoices[] = { 202 const Experiment::Choice kLCDTextChoices[] = {
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 kOsAll, 584 kOsAll,
583 MULTI_VALUE_TYPE(kEnableCompositingForTransitionChoices) 585 MULTI_VALUE_TYPE(kEnableCompositingForTransitionChoices)
584 }, 586 },
585 { 587 {
586 "enable-accelerated-fixed-root-background", 588 "enable-accelerated-fixed-root-background",
587 IDS_FLAGS_ACCELERATED_FIXED_ROOT_BACKGROUND_NAME, 589 IDS_FLAGS_ACCELERATED_FIXED_ROOT_BACKGROUND_NAME,
588 IDS_FLAGS_ACCELERATED_FIXED_ROOT_BACKGROUND_DESCRIPTION, 590 IDS_FLAGS_ACCELERATED_FIXED_ROOT_BACKGROUND_DESCRIPTION,
589 kOsAll, 591 kOsAll,
590 MULTI_VALUE_TYPE(kEnableAcceleratedFixedRootBackgroundChoices) 592 MULTI_VALUE_TYPE(kEnableAcceleratedFixedRootBackgroundChoices)
591 }, 593 },
592 // TODO(bbudge): When NaCl is on by default, remove this flag entry. 594 // Native client is compiled out when DISABLE_NACL is defined.
595 #if !defined(DISABLE_NACL)
593 { 596 {
594 "enable-nacl", // FLAGS:RECORD_UMA 597 "enable-nacl", // FLAGS:RECORD_UMA
595 IDS_FLAGS_ENABLE_NACL_NAME, 598 IDS_FLAGS_ENABLE_NACL_NAME,
596 IDS_FLAGS_ENABLE_NACL_DESCRIPTION, 599 IDS_FLAGS_ENABLE_NACL_DESCRIPTION,
597 kOsDesktop, 600 kOsAll,
598 SINGLE_VALUE_TYPE(switches::kEnableNaCl) 601 SINGLE_VALUE_TYPE(switches::kEnableNaCl)
599 }, 602 },
600 { 603 {
601 "enable-nacl-debug", // FLAGS:RECORD_UMA 604 "enable-nacl-debug", // FLAGS:RECORD_UMA
602 IDS_FLAGS_ENABLE_NACL_DEBUG_NAME, 605 IDS_FLAGS_ENABLE_NACL_DEBUG_NAME,
603 IDS_FLAGS_ENABLE_NACL_DEBUG_DESCRIPTION, 606 IDS_FLAGS_ENABLE_NACL_DEBUG_DESCRIPTION,
604 kOsDesktop, 607 kOsDesktop,
605 SINGLE_VALUE_TYPE(switches::kEnableNaClDebug) 608 SINGLE_VALUE_TYPE(switches::kEnableNaClDebug)
606 }, 609 },
607 { 610 {
608 "disable-pnacl", // FLAGS:RECORD_UMA 611 "disable-pnacl", // FLAGS:RECORD_UMA
609 IDS_FLAGS_DISABLE_PNACL_NAME, 612 IDS_FLAGS_DISABLE_PNACL_NAME,
610 IDS_FLAGS_DISABLE_PNACL_DESCRIPTION, 613 IDS_FLAGS_DISABLE_PNACL_DESCRIPTION,
611 kOsDesktop, 614 kOsDesktop,
612 SINGLE_VALUE_TYPE(switches::kDisablePnacl) 615 SINGLE_VALUE_TYPE(switches::kDisablePnacl)
613 }, 616 },
614 { 617 {
615 "nacl-debug-mask", // FLAGS:RECORD_UMA 618 "nacl-debug-mask", // FLAGS:RECORD_UMA
616 IDS_FLAGS_NACL_DEBUG_MASK_NAME, 619 IDS_FLAGS_NACL_DEBUG_MASK_NAME,
617 IDS_FLAGS_NACL_DEBUG_MASK_DESCRIPTION, 620 IDS_FLAGS_NACL_DEBUG_MASK_DESCRIPTION,
618 kOsDesktop, 621 kOsDesktop,
619 MULTI_VALUE_TYPE(kNaClDebugMaskChoices) 622 MULTI_VALUE_TYPE(kNaClDebugMaskChoices)
620 }, 623 },
624 #endif
621 { 625 {
622 "extension-apis", // FLAGS:RECORD_UMA 626 "extension-apis", // FLAGS:RECORD_UMA
623 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_NAME, 627 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_NAME,
624 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_DESCRIPTION, 628 IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_DESCRIPTION,
625 kOsDesktop, 629 kOsDesktop,
626 SINGLE_VALUE_TYPE(extensions::switches::kEnableExperimentalExtensionApis) 630 SINGLE_VALUE_TYPE(extensions::switches::kEnableExperimentalExtensionApis)
627 }, 631 },
628 { 632 {
629 "extensions-on-chrome-urls", 633 "extensions-on-chrome-urls",
630 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_NAME, 634 IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_NAME,
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
888 chromeos::switches::kDisableNetworkPortalNotification) 892 chromeos::switches::kDisableNetworkPortalNotification)
889 }, 893 },
890 #endif 894 #endif
891 { 895 {
892 "enable-download-resumption", 896 "enable-download-resumption",
893 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_NAME, 897 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_NAME,
894 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_DESCRIPTION, 898 IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_DESCRIPTION,
895 kOsDesktop, 899 kOsDesktop,
896 SINGLE_VALUE_TYPE(switches::kEnableDownloadResumption) 900 SINGLE_VALUE_TYPE(switches::kEnableDownloadResumption)
897 }, 901 },
902 // Native client is compiled out when DISABLE_NACL is defined.
903 #if !defined(DISABLE_NACL)
898 { 904 {
899 "allow-nacl-socket-api", 905 "allow-nacl-socket-api",
900 IDS_FLAGS_ALLOW_NACL_SOCKET_API_NAME, 906 IDS_FLAGS_ALLOW_NACL_SOCKET_API_NAME,
901 IDS_FLAGS_ALLOW_NACL_SOCKET_API_DESCRIPTION, 907 IDS_FLAGS_ALLOW_NACL_SOCKET_API_DESCRIPTION,
902 kOsDesktop, 908 kOsDesktop,
903 SINGLE_VALUE_TYPE_AND_VALUE(switches::kAllowNaClSocketAPI, "*") 909 SINGLE_VALUE_TYPE_AND_VALUE(switches::kAllowNaClSocketAPI, "*")
904 }, 910 },
911 #endif
905 { 912 {
906 "force-device-scale-factor", 913 "force-device-scale-factor",
907 IDS_FLAGS_FORCE_HIGH_DPI_NAME, 914 IDS_FLAGS_FORCE_HIGH_DPI_NAME,
908 IDS_FLAGS_FORCE_HIGH_DPI_DESCRIPTION, 915 IDS_FLAGS_FORCE_HIGH_DPI_DESCRIPTION,
909 kOsCrOS, 916 kOsCrOS,
910 SINGLE_VALUE_TYPE_AND_VALUE(switches::kForceDeviceScaleFactor, "2") 917 SINGLE_VALUE_TYPE_AND_VALUE(switches::kForceDeviceScaleFactor, "2")
911 }, 918 },
912 #if defined(OS_CHROMEOS) 919 #if defined(OS_CHROMEOS)
913 { 920 {
914 "allow-touchpad-three-finger-click", 921 "allow-touchpad-three-finger-click",
(...skipping 1426 matching lines...) Expand 10 before | Expand all | Expand 10 after
2341 } 2348 }
2342 2349
2343 const Experiment* GetExperiments(size_t* count) { 2350 const Experiment* GetExperiments(size_t* count) {
2344 *count = num_experiments; 2351 *count = num_experiments;
2345 return experiments; 2352 return experiments;
2346 } 2353 }
2347 2354
2348 } // namespace testing 2355 } // namespace testing
2349 2356
2350 } // namespace about_flags 2357 } // namespace about_flags
OLDNEW
« no previous file with comments | « build/filename_rules.gypi ('k') | components/nacl/loader/nacl_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698