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

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

Issue 1269773002: Cleanup VersionInfo after componentization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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
« no previous file with comments | « chrome/browser/DEPS ('k') | chrome/browser/android/chrome_startup_flags.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>
11 11
12 #include "base/command_line.h" 12 #include "base/command_line.h"
13 #include "base/memory/singleton.h" 13 #include "base/memory/singleton.h"
14 #include "base/metrics/sparse_histogram.h" 14 #include "base/metrics/sparse_histogram.h"
15 #include "base/stl_util.h" 15 #include "base/stl_util.h"
16 #include "base/strings/string_number_conversions.h" 16 #include "base/strings/string_number_conversions.h"
17 #include "base/strings/string_util.h" 17 #include "base/strings/string_util.h"
18 #include "base/strings/utf_string_conversions.h" 18 #include "base/strings/utf_string_conversions.h"
19 #include "base/values.h" 19 #include "base/values.h"
20 #include "cc/base/switches.h" 20 #include "cc/base/switches.h"
21 #include "chrome/browser/flags_storage.h" 21 #include "chrome/browser/flags_storage.h"
22 #include "chrome/common/channel_info.h"
22 #include "chrome/common/chrome_content_client.h" 23 #include "chrome/common/chrome_content_client.h"
23 #include "chrome/common/chrome_switches.h" 24 #include "chrome/common/chrome_switches.h"
24 #include "chrome/common/chrome_version_info.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/omnibox/browser/omnibox_switches.h" 34 #include "components/omnibox/browser/omnibox_switches.h"
35 #include "components/plugins/common/plugins_switches.h" 35 #include "components/plugins/common/plugins_switches.h"
36 #include "components/proximity_auth/switches.h" 36 #include "components/proximity_auth/switches.h"
37 #include "components/search/search_switches.h" 37 #include "components/search/search_switches.h"
38 #include "components/version_info/version_info.h"
38 #include "content/public/browser/user_metrics.h" 39 #include "content/public/browser/user_metrics.h"
39 #include "media/base/media_switches.h" 40 #include "media/base/media_switches.h"
40 #include "ui/base/l10n/l10n_util.h" 41 #include "ui/base/l10n/l10n_util.h"
41 #include "ui/base/ui_base_switches.h" 42 #include "ui/base/ui_base_switches.h"
42 #include "ui/display/display_switches.h" 43 #include "ui/display/display_switches.h"
43 #include "ui/events/event_switches.h" 44 #include "ui/events/event_switches.h"
44 #include "ui/gfx/switches.h" 45 #include "ui/gfx/switches.h"
45 #include "ui/gl/gl_switches.h" 46 #include "ui/gl/gl_switches.h"
46 #include "ui/keyboard/keyboard_switches.h" 47 #include "ui/keyboard/keyboard_switches.h"
47 #include "ui/native_theme/native_theme_switches.h" 48 #include "ui/native_theme/native_theme_switches.h"
(...skipping 2150 matching lines...) Expand 10 before | Expand all | Expand 10 after
2198 flags_storage->SetFlags(new_enabled_experiments); 2199 flags_storage->SetFlags(new_enabled_experiments);
2199 } 2200 }
2200 2201
2201 void GetSanitizedEnabledFlags( 2202 void GetSanitizedEnabledFlags(
2202 FlagsStorage* flags_storage, std::set<std::string>* result) { 2203 FlagsStorage* flags_storage, std::set<std::string>* result) {
2203 SanitizeList(flags_storage); 2204 SanitizeList(flags_storage);
2204 *result = flags_storage->GetFlags(); 2205 *result = flags_storage->GetFlags();
2205 } 2206 }
2206 2207
2207 bool SkipConditionalExperiment(const Experiment& experiment) { 2208 bool SkipConditionalExperiment(const Experiment& experiment) {
2208 version_info::Channel channel = chrome::VersionInfo::GetChannel(); 2209 version_info::Channel channel = chrome::GetChannel();
2209 2210
2210 #if defined(OS_ANDROID) 2211 #if defined(OS_ANDROID)
2211 // enable-data-reduction-proxy-dev is only available for the Dev/Beta channel. 2212 // enable-data-reduction-proxy-dev is only available for the Dev/Beta channel.
2212 if (!strcmp("enable-data-reduction-proxy-dev", experiment.internal_name) && 2213 if (!strcmp("enable-data-reduction-proxy-dev", experiment.internal_name) &&
2213 channel != version_info::Channel::BETA && 2214 channel != version_info::Channel::BETA &&
2214 channel != version_info::Channel::DEV) { 2215 channel != version_info::Channel::DEV) {
2215 return true; 2216 return true;
2216 } 2217 }
2217 // enable-data-reduction-proxy-alt is only available for the Dev channel. 2218 // enable-data-reduction-proxy-alt is only available for the Dev channel.
2218 if (!strcmp("enable-data-reduction-proxy-alt", experiment.internal_name) && 2219 if (!strcmp("enable-data-reduction-proxy-alt", experiment.internal_name) &&
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
2734 } 2735 }
2735 2736
2736 const Experiment* GetExperiments(size_t* count) { 2737 const Experiment* GetExperiments(size_t* count) {
2737 *count = num_experiments; 2738 *count = num_experiments;
2738 return experiments; 2739 return experiments;
2739 } 2740 }
2740 2741
2741 } // namespace testing 2742 } // namespace testing
2742 2743
2743 } // namespace about_flags 2744 } // namespace about_flags
OLDNEW
« no previous file with comments | « chrome/browser/DEPS ('k') | chrome/browser/android/chrome_startup_flags.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698