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

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

Issue 1256343004: [Android] Add phone progress bar animation behind a flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: string update Created 5 years, 4 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/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 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 "online-check-only" } 535 "online-check-only" }
536 }; 536 };
537 537
538 const Experiment::Choice kV8CacheOptionsChoices[] = { 538 const Experiment::Choice kV8CacheOptionsChoices[] = {
539 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" }, 539 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
540 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kV8CacheOptions, "none" }, 540 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED, switches::kV8CacheOptions, "none" },
541 { IDS_FLAGS_V8_CACHE_OPTIONS_PARSE, switches::kV8CacheOptions, "parse" }, 541 { IDS_FLAGS_V8_CACHE_OPTIONS_PARSE, switches::kV8CacheOptions, "parse" },
542 { IDS_FLAGS_V8_CACHE_OPTIONS_CODE, switches::kV8CacheOptions, "code" }, 542 { IDS_FLAGS_V8_CACHE_OPTIONS_CODE, switches::kV8CacheOptions, "code" },
543 }; 543 };
544 544
545 const Experiment::Choice kProgressBarAnimationChoices[] = {
546 { IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", "" },
547 { IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED,
548 switches::kProgressBarAnimation, "disabled" },
549 { IDS_FLAGS_PROGRESS_BAR_ANIMATION_SMOOTH,
550 switches::kProgressBarAnimation, "smooth" },
551 { IDS_FLAGS_PROGRESS_BAR_ANIMATION_FAST_START,
552 switches::kProgressBarAnimation, "fast-start" },
553 };
554
545 // RECORDING USER METRICS FOR FLAGS: 555 // RECORDING USER METRICS FOR FLAGS:
546 // ----------------------------------------------------------------------------- 556 // -----------------------------------------------------------------------------
547 // The first line of the experiment is the internal name. If you'd like to 557 // The first line of the experiment is the internal name. If you'd like to
548 // gather statistics about the usage of your flag, you should append a marker 558 // gather statistics about the usage of your flag, you should append a marker
549 // comment to the end of the feature name, like so: 559 // comment to the end of the feature name, like so:
550 // "my-special-feature", // FLAGS:RECORD_UMA 560 // "my-special-feature", // FLAGS:RECORD_UMA
551 // 561 //
552 // After doing that, run 562 // After doing that, run
553 // tools/metrics/actions/extract_actions.py 563 // tools/metrics/actions/extract_actions.py
554 // to add the metric to actions.xml (which will enable UMA to record your 564 // to add the metric to actions.xml (which will enable UMA to record your
(...skipping 1513 matching lines...) Expand 10 before | Expand all | Expand 10 after
2068 SINGLE_VALUE_TYPE(switches::kEnableNewTaskManager) 2078 SINGLE_VALUE_TYPE(switches::kEnableNewTaskManager)
2069 }, 2079 },
2070 #endif // defined(ENABLE_TASK_MANAGER) 2080 #endif // defined(ENABLE_TASK_MANAGER)
2071 {"simplified-fullscreen-ui", 2081 {"simplified-fullscreen-ui",
2072 IDS_FLAGS_SIMPLIFIED_FULLSCREEN_UI_NAME, 2082 IDS_FLAGS_SIMPLIFIED_FULLSCREEN_UI_NAME,
2073 IDS_FLAGS_SIMPLIFIED_FULLSCREEN_UI_DESCRIPTION, 2083 IDS_FLAGS_SIMPLIFIED_FULLSCREEN_UI_DESCRIPTION,
2074 kOsDesktop, 2084 kOsDesktop,
2075 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSimplifiedFullscreenUI, 2085 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSimplifiedFullscreenUI,
2076 switches::kDisableSimplifiedFullscreenUI) 2086 switches::kDisableSimplifiedFullscreenUI)
2077 }, 2087 },
2088 #if defined(OS_ANDROID)
2089 {"progress-bar-animation",
2090 IDS_FLAGS_PROGRESS_BAR_ANIMATION_NAME,
2091 IDS_FLAGS_PROGRESS_BAR_ANIMATION_DESCRIPTION,
2092 kOsAndroid,
2093 MULTI_VALUE_TYPE(kProgressBarAnimationChoices)},
2094 #endif // defined(OS_ANDROID)
2095
2078 // NOTE: Adding new command-line switches requires adding corresponding 2096 // NOTE: Adding new command-line switches requires adding corresponding
2079 // entries to enum "LoginCustomFlags" in histograms.xml. See note in 2097 // entries to enum "LoginCustomFlags" in histograms.xml. See note in
2080 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. 2098 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test.
2081 }; 2099 };
2082 2100
2083 const Experiment* experiments = kExperiments; 2101 const Experiment* experiments = kExperiments;
2084 size_t num_experiments = arraysize(kExperiments); 2102 size_t num_experiments = arraysize(kExperiments);
2085 2103
2086 // Stores and encapsulates the little state that about:flags has. 2104 // Stores and encapsulates the little state that about:flags has.
2087 class FlagsState { 2105 class FlagsState {
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after
2710 } 2728 }
2711 2729
2712 const Experiment* GetExperiments(size_t* count) { 2730 const Experiment* GetExperiments(size_t* count) {
2713 *count = num_experiments; 2731 *count = num_experiments;
2714 return experiments; 2732 return experiments;
2715 } 2733 }
2716 2734
2717 } // namespace testing 2735 } // namespace testing
2718 2736
2719 } // namespace about_flags 2737 } // namespace about_flags
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698