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

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

Issue 1373843004: Added PPAPI win32k lockdown options to chrome://flags. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed actions.xml patch. Created 5 years, 2 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/app/generated_resources.grd ('k') | content/common/content_switches_internal.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 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 #if defined(OS_CHROMEOS) 531 #if defined(OS_CHROMEOS)
532 const Experiment::Choice kCrosRegionsModeChoices[] = { 532 const Experiment::Choice kCrosRegionsModeChoices[] = {
533 { IDS_FLAGS_CROS_REGIONS_MODE_DEFAULT, "", "" }, 533 { IDS_FLAGS_CROS_REGIONS_MODE_DEFAULT, "", "" },
534 { IDS_FLAGS_CROS_REGIONS_MODE_OVERRIDE, chromeos::switches::kCrosRegionsMode, 534 { IDS_FLAGS_CROS_REGIONS_MODE_OVERRIDE, chromeos::switches::kCrosRegionsMode,
535 chromeos::switches::kCrosRegionsModeOverride }, 535 chromeos::switches::kCrosRegionsModeOverride },
536 { IDS_FLAGS_CROS_REGIONS_MODE_HIDE, chromeos::switches::kCrosRegionsMode, 536 { IDS_FLAGS_CROS_REGIONS_MODE_HIDE, chromeos::switches::kCrosRegionsMode,
537 chromeos::switches::kCrosRegionsModeHide }, 537 chromeos::switches::kCrosRegionsModeHide },
538 }; 538 };
539 #endif // defined(OS_CHROMEOS) 539 #endif // defined(OS_CHROMEOS)
540 540
541 #if defined(OS_WIN)
542 const Experiment::Choice kPpapiWin32kLockdown[] = {
543 {IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""},
544 {IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
545 switches::kEnableWin32kLockDownMimeTypes, ""},
546 {IDS_FLAGS_PPAPI_WIN32K_LOCKDOWN_FLASH_ONLY,
547 switches::kEnableWin32kLockDownMimeTypes,
548 "application/x-shockwave-flash,application/futuresplash"},
549 {IDS_FLAGS_PPAPI_WIN32K_LOCKDOWN_PDF_ONLY,
550 switches::kEnableWin32kLockDownMimeTypes,
551 "application/x-google-chrome-pdf,application/pdf"},
552 {IDS_FLAGS_PPAPI_WIN32K_LOCKDOWN_FLASH_AND_PDF,
553 switches::kEnableWin32kLockDownMimeTypes,
554 "application/x-shockwave-flash,application/futuresplash,"
555 "application/x-google-chrome-pdf,application/pdf"},
556 {IDS_FLAGS_PPAPI_WIN32K_LOCKDOWN_ALL,
557 switches::kEnableWin32kLockDownMimeTypes, "*"},
558 };
559 #endif // defined(OS_WIN)
560
541 // RECORDING USER METRICS FOR FLAGS: 561 // RECORDING USER METRICS FOR FLAGS:
542 // ----------------------------------------------------------------------------- 562 // -----------------------------------------------------------------------------
543 // The first line of the experiment is the internal name. If you'd like to 563 // The first line of the experiment is the internal name. If you'd like to
544 // gather statistics about the usage of your flag, you should append a marker 564 // gather statistics about the usage of your flag, you should append a marker
545 // comment to the end of the feature name, like so: 565 // comment to the end of the feature name, like so:
546 // "my-special-feature", // FLAGS:RECORD_UMA 566 // "my-special-feature", // FLAGS:RECORD_UMA
547 // 567 //
548 // After doing that, run 568 // After doing that, run
549 // tools/metrics/actions/extract_actions.py 569 // tools/metrics/actions/extract_actions.py
550 // to add the metric to actions.xml (which will enable UMA to record your 570 // to add the metric to actions.xml (which will enable UMA to record your
(...skipping 1515 matching lines...) Expand 10 before | Expand all | Expand 10 after
2066 kOsDesktop, 2086 kOsDesktop,
2067 SINGLE_VALUE_TYPE(switches::kEnableWebUsbOnAnyOrigin)}, 2087 SINGLE_VALUE_TYPE(switches::kEnableWebUsbOnAnyOrigin)},
2068 #endif 2088 #endif
2069 #if defined(OS_CHROMEOS) 2089 #if defined(OS_CHROMEOS)
2070 {"cros-regions-mode", 2090 {"cros-regions-mode",
2071 IDS_FLAGS_CROS_REGIONS_MODE_NAME, 2091 IDS_FLAGS_CROS_REGIONS_MODE_NAME,
2072 IDS_FLAGS_CROS_REGIONS_MODE_DESCRIPTION, 2092 IDS_FLAGS_CROS_REGIONS_MODE_DESCRIPTION,
2073 kOsCrOS, 2093 kOsCrOS,
2074 MULTI_VALUE_TYPE(kCrosRegionsModeChoices)}, 2094 MULTI_VALUE_TYPE(kCrosRegionsModeChoices)},
2075 #endif // OS_CHROMEOS 2095 #endif // OS_CHROMEOS
2096 #if defined(OS_WIN)
2097 {"enable-ppapi-win32k-lockdown",
2098 IDS_FLAGS_PPAPI_WIN32K_LOCKDOWN_NAME,
2099 IDS_FLAGS_PPAPI_WIN32K_LOCKDOWN_DESCRIPTION, kOsWin,
2100 MULTI_VALUE_TYPE(kPpapiWin32kLockdown)},
2101 #endif // defined(OS_WIN)
2076 // NOTE: Adding new command-line switches requires adding corresponding 2102 // NOTE: Adding new command-line switches requires adding corresponding
2077 // entries to enum "LoginCustomFlags" in histograms.xml. See note in 2103 // entries to enum "LoginCustomFlags" in histograms.xml. See note in
2078 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. 2104 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test.
2079 }; 2105 };
2080 2106
2081 const Experiment* experiments = kExperiments; 2107 const Experiment* experiments = kExperiments;
2082 size_t num_experiments = arraysize(kExperiments); 2108 size_t num_experiments = arraysize(kExperiments);
2083 2109
2084 // Stores and encapsulates the little state that about:flags has. 2110 // Stores and encapsulates the little state that about:flags has.
2085 class FlagsState { 2111 class FlagsState {
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after
2708 } 2734 }
2709 2735
2710 const Experiment* GetExperiments(size_t* count) { 2736 const Experiment* GetExperiments(size_t* count) {
2711 *count = num_experiments; 2737 *count = num_experiments;
2712 return experiments; 2738 return experiments;
2713 } 2739 }
2714 2740
2715 } // namespace testing 2741 } // namespace testing
2716 2742
2717 } // namespace about_flags 2743 } // namespace about_flags
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | content/common/content_switches_internal.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698