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

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

Issue 9630002: Ash: Remove compact window mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: OpaqueBrowserFrameView, MultipleWindowIndicatorButton Created 8 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 | Annotate | Revision Log
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 <algorithm> 7 #include <algorithm>
8 #include <iterator> 8 #include <iterator>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 const Experiment::Choice kOmniboxInlineHistoryQuickProviderChoices[] = { 80 const Experiment::Choice kOmniboxInlineHistoryQuickProviderChoices[] = {
81 { IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_AUTOMATIC, "", "" }, 81 { IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_AUTOMATIC, "", "" },
82 { IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_ALLOWED, 82 { IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_ALLOWED,
83 switches::kOmniboxInlineHistoryQuickProvider, 83 switches::kOmniboxInlineHistoryQuickProvider,
84 switches::kOmniboxInlineHistoryQuickProviderAllowed }, 84 switches::kOmniboxInlineHistoryQuickProviderAllowed },
85 { IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_PROHIBITED, 85 { IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_PROHIBITED,
86 switches::kOmniboxInlineHistoryQuickProvider, 86 switches::kOmniboxInlineHistoryQuickProvider,
87 switches::kOmniboxInlineHistoryQuickProviderProhibited } 87 switches::kOmniboxInlineHistoryQuickProviderProhibited }
88 }; 88 };
89 89
90 #if defined(USE_AURA)
91 const Experiment::Choice kAuraWindowModeChoices[] = {
92 { IDS_FLAGS_AURA_WINDOW_MODE_AUTOMATIC, "", "" },
93 { IDS_FLAGS_AURA_WINDOW_MODE_COMPACT,
94 ash::switches::kAuraWindowMode,
95 ash::switches::kAuraWindowModeCompact },
96 { IDS_FLAGS_AURA_WINDOW_MODE_MANAGED,
97 ash::switches::kAuraWindowMode,
98 ash::switches::kAuraWindowModeManaged },
99 };
100 #endif
101
102 // RECORDING USER METRICS FOR FLAGS: 90 // RECORDING USER METRICS FOR FLAGS:
103 // ----------------------------------------------------------------------------- 91 // -----------------------------------------------------------------------------
104 // The first line of the experiment is the internal name. If you'd like to 92 // The first line of the experiment is the internal name. If you'd like to
105 // gather statistics about the usage of your flag, you should append a marker 93 // gather statistics about the usage of your flag, you should append a marker
106 // comment to the end of the feature name, like so: 94 // comment to the end of the feature name, like so:
107 // "my-special-feature", // FLAGS:RECORD_UMA 95 // "my-special-feature", // FLAGS:RECORD_UMA
108 // 96 //
109 // After doing that, run //chrome/tools/extract_actions.py (see instructions at 97 // After doing that, run //chrome/tools/extract_actions.py (see instructions at
110 // the top of that file for details) to update the chromeactions.txt file, which 98 // the top of that file for details) to update the chromeactions.txt file, which
111 // will enable UMA to record your feature flag. 99 // will enable UMA to record your feature flag.
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 SINGLE_VALUE_TYPE(switches::kEnablePointerLock) 438 SINGLE_VALUE_TYPE(switches::kEnablePointerLock)
451 }, 439 },
452 #if defined(USE_AURA) 440 #if defined(USE_AURA)
453 { 441 {
454 "aura-google-dialog-frames", 442 "aura-google-dialog-frames",
455 IDS_FLAGS_AURA_GOOGLE_DIALOG_FRAMES_NAME, 443 IDS_FLAGS_AURA_GOOGLE_DIALOG_FRAMES_NAME,
456 IDS_FLAGS_AURA_GOOGLE_DIALOG_FRAMES_DESCRIPTION, 444 IDS_FLAGS_AURA_GOOGLE_DIALOG_FRAMES_DESCRIPTION,
457 kOsWin | kOsLinux | kOsCrOS, 445 kOsWin | kOsLinux | kOsCrOS,
458 SINGLE_VALUE_TYPE(ash::switches::kAuraGoogleDialogFrames) 446 SINGLE_VALUE_TYPE(ash::switches::kAuraGoogleDialogFrames)
459 }, 447 },
460 {
461 "aura-window-mode",
462 IDS_FLAGS_AURA_WINDOW_MODE_NAME,
463 IDS_FLAGS_AURA_WINDOW_MODE_DESCRIPTION,
464 kOsWin | kOsLinux | kOsCrOS,
465 MULTI_VALUE_TYPE(kAuraWindowModeChoices)
466 },
467 #endif // defined(USE_AURA) 448 #endif // defined(USE_AURA)
468 { 449 {
469 "enable-gamepad", 450 "enable-gamepad",
470 IDS_FLAGS_ENABLE_GAMEPAD_NAME, 451 IDS_FLAGS_ENABLE_GAMEPAD_NAME,
471 IDS_FLAGS_ENABLE_GAMEPAD_DESCRIPTION, 452 IDS_FLAGS_ENABLE_GAMEPAD_DESCRIPTION,
472 kOsAll, 453 kOsAll,
473 SINGLE_VALUE_TYPE(switches::kEnableGamepad) 454 SINGLE_VALUE_TYPE(switches::kEnableGamepad)
474 }, 455 },
475 { 456 {
476 "per-tile-painting", 457 "per-tile-painting",
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
791 const Experiment& experiment = experiments[i]; 772 const Experiment& experiment = experiments[i];
792 773
793 DictionaryValue* data = new DictionaryValue(); 774 DictionaryValue* data = new DictionaryValue();
794 data->SetString("internal_name", experiment.internal_name); 775 data->SetString("internal_name", experiment.internal_name);
795 data->SetString("name", 776 data->SetString("name",
796 l10n_util::GetStringUTF16(experiment.visible_name_id)); 777 l10n_util::GetStringUTF16(experiment.visible_name_id));
797 data->SetString("description", 778 data->SetString("description",
798 l10n_util::GetStringUTF16( 779 l10n_util::GetStringUTF16(
799 experiment.visible_description_id)); 780 experiment.visible_description_id));
800 bool supported = !!(experiment.supported_platforms & current_platform); 781 bool supported = !!(experiment.supported_platforms & current_platform);
801 #if defined(USE_AURA) && defined(OS_CHROMEOS)
802 // Some Chrome OS devices currently require Aura compact window mode, so
803 // don't offer a choice of mode.
804 // TODO(jamescook): Remove after Aura supports normal mode on all devices,
805 // likely around M19.
806 if (experiment.visible_name_id == IDS_FLAGS_AURA_WINDOW_MODE_NAME &&
807 CommandLine::ForCurrentProcess()->
808 HasSwitch(ash::switches::kAuraForceCompactWindowMode))
809 supported = false;
810 #endif
811 data->SetBoolean("supported", supported); 782 data->SetBoolean("supported", supported);
812 783
813 ListValue* supported_platforms = new ListValue(); 784 ListValue* supported_platforms = new ListValue();
814 AddOsStrings(experiment.supported_platforms, supported_platforms); 785 AddOsStrings(experiment.supported_platforms, supported_platforms);
815 data->Set("supported_platforms", supported_platforms); 786 data->Set("supported_platforms", supported_platforms);
816 787
817 switch (experiment.type) { 788 switch (experiment.type) {
818 case Experiment::SINGLE_VALUE: 789 case Experiment::SINGLE_VALUE:
819 data->SetBoolean( 790 data->SetBoolean(
820 "enabled", 791 "enabled",
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
1039 } 1010 }
1040 1011
1041 const Experiment* GetExperiments(size_t* count) { 1012 const Experiment* GetExperiments(size_t* count) {
1042 *count = num_experiments; 1013 *count = num_experiments;
1043 return experiments; 1014 return experiments;
1044 } 1015 }
1045 1016
1046 } // namespace testing 1017 } // namespace testing
1047 1018
1048 } // namespace about_flags 1019 } // namespace about_flags
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698