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

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

Issue 1260403004: Add about flag for offline page experiment (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add enum entries in histograms for switches 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 13 matching lines...) Expand all
24 #include "chrome/common/chrome_switches.h" 24 #include "chrome/common/chrome_switches.h"
25 #include "chrome/grit/chromium_strings.h" 25 #include "chrome/grit/chromium_strings.h"
26 #include "chrome/grit/generated_resources.h" 26 #include "chrome/grit/generated_resources.h"
27 #include "chrome/grit/google_chrome_strings.h" 27 #include "chrome/grit/google_chrome_strings.h"
28 #include "components/autofill/core/common/autofill_switches.h" 28 #include "components/autofill/core/common/autofill_switches.h"
29 #include "components/cloud_devices/common/cloud_devices_switches.h" 29 #include "components/cloud_devices/common/cloud_devices_switches.h"
30 #include "components/dom_distiller/core/dom_distiller_switches.h" 30 #include "components/dom_distiller/core/dom_distiller_switches.h"
31 #include "components/enhanced_bookmarks/enhanced_bookmark_switches.h" 31 #include "components/enhanced_bookmarks/enhanced_bookmark_switches.h"
32 #include "components/metrics/metrics_hashes.h" 32 #include "components/metrics/metrics_hashes.h"
33 #include "components/nacl/common/nacl_switches.h" 33 #include "components/nacl/common/nacl_switches.h"
34 #include "components/offline_pages/offline_page_switches.h"
34 #include "components/omnibox/browser/omnibox_switches.h" 35 #include "components/omnibox/browser/omnibox_switches.h"
35 #include "components/plugins/common/plugins_switches.h" 36 #include "components/plugins/common/plugins_switches.h"
36 #include "components/proximity_auth/switches.h" 37 #include "components/proximity_auth/switches.h"
37 #include "components/search/search_switches.h" 38 #include "components/search/search_switches.h"
38 #include "components/version_info/version_info.h" 39 #include "components/version_info/version_info.h"
39 #include "content/public/browser/user_metrics.h" 40 #include "content/public/browser/user_metrics.h"
40 #include "media/base/media_switches.h" 41 #include "media/base/media_switches.h"
41 #include "ui/base/l10n/l10n_util.h" 42 #include "ui/base/l10n/l10n_util.h"
42 #include "ui/base/ui_base_switches.h" 43 #include "ui/base/ui_base_switches.h"
43 #include "ui/display/display_switches.h" 44 #include "ui/display/display_switches.h"
(...skipping 2048 matching lines...) Expand 10 before | Expand all | Expand 10 after
2092 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSimplifiedFullscreenUI, 2093 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableSimplifiedFullscreenUI,
2093 switches::kDisableSimplifiedFullscreenUI) 2094 switches::kDisableSimplifiedFullscreenUI)
2094 }, 2095 },
2095 #if defined(OS_ANDROID) 2096 #if defined(OS_ANDROID)
2096 {"progress-bar-animation", 2097 {"progress-bar-animation",
2097 IDS_FLAGS_PROGRESS_BAR_ANIMATION_NAME, 2098 IDS_FLAGS_PROGRESS_BAR_ANIMATION_NAME,
2098 IDS_FLAGS_PROGRESS_BAR_ANIMATION_DESCRIPTION, 2099 IDS_FLAGS_PROGRESS_BAR_ANIMATION_DESCRIPTION,
2099 kOsAndroid, 2100 kOsAndroid,
2100 MULTI_VALUE_TYPE(kProgressBarAnimationChoices)}, 2101 MULTI_VALUE_TYPE(kProgressBarAnimationChoices)},
2101 #endif // defined(OS_ANDROID) 2102 #endif // defined(OS_ANDROID)
2103 #if defined(OS_ANDROID)
2104 {"offline-pages",
fgorski 2015/08/04 23:28:07 Did you consider: enable-offline-pages or offline-
jianli 2015/08/04 23:39:03 This is the internal name that is not exposed to t
2105 IDS_FLAGS_OFFLINE_PAGES_NAME,
2106 IDS_FLAGS_OFFLINE_PAGES_DESCRIPTION,
2107 kOsAndroid,
2108 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableOfflinePages,
2109 switches::kDisableOfflinePages)},
2110 #endif // defined(OS_ANDROID)
2102 2111
2103 // NOTE: Adding new command-line switches requires adding corresponding 2112 // NOTE: Adding new command-line switches requires adding corresponding
2104 // entries to enum "LoginCustomFlags" in histograms.xml. See note in 2113 // entries to enum "LoginCustomFlags" in histograms.xml. See note in
2105 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. 2114 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test.
2106 }; 2115 };
2107 2116
2108 const Experiment* experiments = kExperiments; 2117 const Experiment* experiments = kExperiments;
2109 size_t num_experiments = arraysize(kExperiments); 2118 size_t num_experiments = arraysize(kExperiments);
2110 2119
2111 // Stores and encapsulates the little state that about:flags has. 2120 // Stores and encapsulates the little state that about:flags has.
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
2735 } 2744 }
2736 2745
2737 const Experiment* GetExperiments(size_t* count) { 2746 const Experiment* GetExperiments(size_t* count) {
2738 *count = num_experiments; 2747 *count = num_experiments;
2739 return experiments; 2748 return experiments;
2740 } 2749 }
2741 2750
2742 } // namespace testing 2751 } // namespace testing
2743 2752
2744 } // namespace about_flags 2753 } // namespace about_flags
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698