OLD | NEW |
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 "content/public/app/content_main_runner.h" | 5 #include "content/public/app/content_main_runner.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdlib.h> | 8 #include <stdlib.h> |
9 #include <string.h> | 9 #include <string.h> |
10 | 10 |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 // On POSIX systems that use the zygote, we get the trials from a shared | 148 // On POSIX systems that use the zygote, we get the trials from a shared |
149 // memory segment backed by an fd instead of the command line. | 149 // memory segment backed by an fd instead of the command line. |
150 base::FieldTrialList::CreateTrialsFromCommandLine( | 150 base::FieldTrialList::CreateTrialsFromCommandLine( |
151 command_line, switches::kFieldTrialHandle, kFieldTrialDescriptor); | 151 command_line, switches::kFieldTrialHandle, kFieldTrialDescriptor); |
152 #else | 152 #else |
153 base::FieldTrialList::CreateTrialsFromCommandLine( | 153 base::FieldTrialList::CreateTrialsFromCommandLine( |
154 command_line, switches::kFieldTrialHandle, -1); | 154 command_line, switches::kFieldTrialHandle, -1); |
155 #endif | 155 #endif |
156 | 156 |
157 std::unique_ptr<base::FeatureList> feature_list(new base::FeatureList); | 157 std::unique_ptr<base::FeatureList> feature_list(new base::FeatureList); |
158 feature_list->InitializeFromCommandLine( | 158 base::FieldTrialList::CreateFeaturesFromCommandLine( |
159 command_line.GetSwitchValueASCII(switches::kEnableFeatures), | 159 command_line, switches::kEnableFeatures, switches::kDisableFeatures, |
160 command_line.GetSwitchValueASCII(switches::kDisableFeatures)); | 160 feature_list.get()); |
161 base::FeatureList::SetInstance(std::move(feature_list)); | 161 base::FeatureList::SetInstance(std::move(feature_list)); |
162 } | 162 } |
163 | 163 |
164 } // namespace | 164 } // namespace |
165 | 165 |
166 #if !defined(CHROME_MULTIPLE_DLL_CHILD) | 166 #if !defined(CHROME_MULTIPLE_DLL_CHILD) |
167 base::LazyInstance<ContentBrowserClient> | 167 base::LazyInstance<ContentBrowserClient> |
168 g_empty_content_browser_client = LAZY_INSTANCE_INITIALIZER; | 168 g_empty_content_browser_client = LAZY_INSTANCE_INITIALIZER; |
169 #endif // !CHROME_MULTIPLE_DLL_CHILD | 169 #endif // !CHROME_MULTIPLE_DLL_CHILD |
170 | 170 |
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
842 | 842 |
843 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); | 843 DISALLOW_COPY_AND_ASSIGN(ContentMainRunnerImpl); |
844 }; | 844 }; |
845 | 845 |
846 // static | 846 // static |
847 ContentMainRunner* ContentMainRunner::Create() { | 847 ContentMainRunner* ContentMainRunner::Create() { |
848 return new ContentMainRunnerImpl(); | 848 return new ContentMainRunnerImpl(); |
849 } | 849 } |
850 | 850 |
851 } // namespace content | 851 } // namespace content |
OLD | NEW |