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

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

Issue 2129543002: Registering field trial for a feature overridden in chrome://flags. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: After code review #1 Created 4 years, 5 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 2039 matching lines...) Expand 10 before | Expand all | Expand 10 after
2050 flags_ui::SentinelsMode sentinels) { 2050 flags_ui::SentinelsMode sentinels) {
2051 if (command_line->HasSwitch(switches::kNoExperiments)) 2051 if (command_line->HasSwitch(switches::kNoExperiments))
2052 return; 2052 return;
2053 2053
2054 FlagsStateSingleton::GetFlagsState()->ConvertFlagsToSwitches( 2054 FlagsStateSingleton::GetFlagsState()->ConvertFlagsToSwitches(
2055 flags_storage, command_line, sentinels, switches::kEnableFeatures, 2055 flags_storage, command_line, sentinels, switches::kEnableFeatures,
2056 switches::kDisableFeatures); 2056 switches::kDisableFeatures);
2057 } 2057 }
2058 2058
2059 void RegisterAllFeatureVariationParameters( 2059 void RegisterAllFeatureVariationParameters(
2060 flags_ui::FlagsStorage* flags_storage) { 2060 flags_ui::FlagsStorage* flags_storage,
2061 base::FeatureList* feature_list) {
2061 FlagsStateSingleton::GetFlagsState()->RegisterAllFeatureVariationParameters( 2062 FlagsStateSingleton::GetFlagsState()->RegisterAllFeatureVariationParameters(
2062 flags_storage); 2063 flags_storage, feature_list);
2063 } 2064 }
2064 2065
2065 bool AreSwitchesIdenticalToCurrentCommandLine( 2066 bool AreSwitchesIdenticalToCurrentCommandLine(
2066 const base::CommandLine& new_cmdline, 2067 const base::CommandLine& new_cmdline,
2067 const base::CommandLine& active_cmdline, 2068 const base::CommandLine& active_cmdline,
2068 std::set<base::CommandLine::StringType>* out_difference) { 2069 std::set<base::CommandLine::StringType>* out_difference) {
2069 const char* extra_flag_sentinel_begin_flag_name = nullptr; 2070 const char* extra_flag_sentinel_begin_flag_name = nullptr;
2070 const char* extra_flag_sentinel_end_flag_name = nullptr; 2071 const char* extra_flag_sentinel_end_flag_name = nullptr;
2071 #if defined(OS_CHROMEOS) 2072 #if defined(OS_CHROMEOS)
2072 // Put the flags between --policy-switches--begin and --policy-switches-end on 2073 // Put the flags between --policy-switches--begin and --policy-switches-end on
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
2160 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0; 2161 const base::HistogramBase::Sample kBadSwitchFormatHistogramId = 0;
2161 2162
2162 const FeatureEntry* GetFeatureEntries(size_t* count) { 2163 const FeatureEntry* GetFeatureEntries(size_t* count) {
2163 *count = arraysize(kFeatureEntries); 2164 *count = arraysize(kFeatureEntries);
2164 return kFeatureEntries; 2165 return kFeatureEntries;
2165 } 2166 }
2166 2167
2167 } // namespace testing 2168 } // namespace testing
2168 2169
2169 } // namespace about_flags 2170 } // namespace about_flags
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698