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

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

Issue 2036193002: Allow overriding variation parameter via chrome://flags. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: After code review #1 Created 4 years, 6 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 1994 matching lines...) Expand 10 before | Expand all | Expand 10 after
2005 base::CommandLine* command_line, 2005 base::CommandLine* command_line,
2006 flags_ui::SentinelsMode sentinels) { 2006 flags_ui::SentinelsMode sentinels) {
2007 if (command_line->HasSwitch(switches::kNoExperiments)) 2007 if (command_line->HasSwitch(switches::kNoExperiments))
2008 return; 2008 return;
2009 2009
2010 FlagsStateSingleton::GetFlagsState()->ConvertFlagsToSwitches( 2010 FlagsStateSingleton::GetFlagsState()->ConvertFlagsToSwitches(
2011 flags_storage, command_line, sentinels, switches::kEnableFeatures, 2011 flags_storage, command_line, sentinels, switches::kEnableFeatures,
2012 switches::kDisableFeatures); 2012 switches::kDisableFeatures);
2013 } 2013 }
2014 2014
2015 void RegisterAllFeatureVariationParameters(
2016 flags_ui::FlagsStorage* flags_storage) {
2017 FlagsStateSingleton::GetFlagsState()->RegisterAllFeatureVariationParameters(
2018 flags_storage);
2019 }
2020
2015 bool AreSwitchesIdenticalToCurrentCommandLine( 2021 bool AreSwitchesIdenticalToCurrentCommandLine(
2016 const base::CommandLine& new_cmdline, 2022 const base::CommandLine& new_cmdline,
2017 const base::CommandLine& active_cmdline, 2023 const base::CommandLine& active_cmdline,
2018 std::set<base::CommandLine::StringType>* out_difference) { 2024 std::set<base::CommandLine::StringType>* out_difference) {
2019 const char* extra_flag_sentinel_begin_flag_name = nullptr; 2025 const char* extra_flag_sentinel_begin_flag_name = nullptr;
2020 const char* extra_flag_sentinel_end_flag_name = nullptr; 2026 const char* extra_flag_sentinel_end_flag_name = nullptr;
2021 #if defined(OS_CHROMEOS) 2027 #if defined(OS_CHROMEOS)
2022 // Put the flags between --policy-switches--begin and --policy-switches-end on 2028 // Put the flags between --policy-switches--begin and --policy-switches-end on
2023 // ChromeOS. 2029 // ChromeOS.
2024 extra_flag_sentinel_begin_flag_name = 2030 extra_flag_sentinel_begin_flag_name =
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
2110 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; 2116 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0;
2111 2117
2112 const FeatureEntry* GetFeatureEntries(size_t* count) { 2118 const FeatureEntry* GetFeatureEntries(size_t* count) {
2113 *count = arraysize(kFeatureEntries); 2119 *count = arraysize(kFeatureEntries);
2114 return kFeatureEntries; 2120 return kFeatureEntries;
2115 } 2121 }
2116 2122
2117 } // namespace testing 2123 } // namespace testing
2118 2124
2119 } // namespace about_flags 2125 } // namespace about_flags
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698