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 "chrome/browser/chrome_content_browser_client.h" | 5 #include "chrome/browser/chrome_content_browser_client.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <set> | 8 #include <set> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 #include "components/prefs/pref_service.h" | 138 #include "components/prefs/pref_service.h" |
139 #include "components/prefs/scoped_user_pref_update.h" | 139 #include "components/prefs/scoped_user_pref_update.h" |
140 #include "components/rappor/public/rappor_utils.h" | 140 #include "components/rappor/public/rappor_utils.h" |
141 #include "components/rappor/rappor_recorder_impl.h" | 141 #include "components/rappor/rappor_recorder_impl.h" |
142 #include "components/rappor/rappor_service_impl.h" | 142 #include "components/rappor/rappor_service_impl.h" |
143 #include "components/security_interstitials/core/ssl_error_ui.h" | 143 #include "components/security_interstitials/core/ssl_error_ui.h" |
144 #include "components/signin/core/common/profile_management_switches.h" | 144 #include "components/signin/core/common/profile_management_switches.h" |
145 #include "components/spellcheck/spellcheck_build_features.h" | 145 #include "components/spellcheck/spellcheck_build_features.h" |
146 #include "components/startup_metric_utils/browser/startup_metric_host_impl.h" | 146 #include "components/startup_metric_utils/browser/startup_metric_host_impl.h" |
147 #include "components/task_scheduler_util/browser/initialization.h" | 147 #include "components/task_scheduler_util/browser/initialization.h" |
| 148 #include "components/task_scheduler_util/common/variations_util.h" |
148 #include "components/translate/core/common/translate_switches.h" | 149 #include "components/translate/core/common/translate_switches.h" |
149 #include "components/url_formatter/url_fixer.h" | 150 #include "components/url_formatter/url_fixer.h" |
150 #include "components/variations/variations_associated_data.h" | 151 #include "components/variations/variations_associated_data.h" |
151 #include "components/version_info/version_info.h" | 152 #include "components/version_info/version_info.h" |
152 #include "content/public/browser/browser_child_process_host.h" | 153 #include "content/public/browser/browser_child_process_host.h" |
153 #include "content/public/browser/browser_main_parts.h" | 154 #include "content/public/browser/browser_main_parts.h" |
154 #include "content/public/browser/browser_ppapi_host.h" | 155 #include "content/public/browser/browser_ppapi_host.h" |
155 #include "content/public/browser/browser_thread.h" | 156 #include "content/public/browser/browser_thread.h" |
156 #include "content/public/browser/browser_url_handler.h" | 157 #include "content/public/browser/browser_url_handler.h" |
157 #include "content/public/browser/child_process_data.h" | 158 #include "content/public/browser/child_process_data.h" |
(...skipping 1652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1810 | 1811 |
1811 // The command line switch kEnableBenchmarking needs to be specified along | 1812 // The command line switch kEnableBenchmarking needs to be specified along |
1812 // with the kEnableStatsTable switch to ensure that the stats table global | 1813 // with the kEnableStatsTable switch to ensure that the stats table global |
1813 // is initialized correctly. | 1814 // is initialized correctly. |
1814 if (command_line->HasSwitch(switches::kEnableBenchmarking)) | 1815 if (command_line->HasSwitch(switches::kEnableBenchmarking)) |
1815 DCHECK(command_line->HasSwitch(switches::kEnableStatsTable)); | 1816 DCHECK(command_line->HasSwitch(switches::kEnableStatsTable)); |
1816 | 1817 |
1817 StackSamplingConfiguration::Get()->AppendCommandLineSwitchForChildProcess( | 1818 StackSamplingConfiguration::Get()->AppendCommandLineSwitchForChildProcess( |
1818 process_type, | 1819 process_type, |
1819 command_line); | 1820 command_line); |
| 1821 |
| 1822 if (process_type == switches::kRendererProcess) { |
| 1823 std::map<std::string, std::string> task_scheduler_variation_params; |
| 1824 if (variations::GetVariationParams("BrowserScheduler", |
| 1825 &task_scheduler_variation_params)) { |
| 1826 task_scheduler_util::AddVariationParamsToCommandLine( |
| 1827 task_scheduler_variation_params, "Renderer", command_line); |
| 1828 } |
| 1829 } |
1820 } | 1830 } |
1821 | 1831 |
1822 std::string ChromeContentBrowserClient::GetApplicationLocale() { | 1832 std::string ChromeContentBrowserClient::GetApplicationLocale() { |
1823 if (BrowserThread::CurrentlyOn(BrowserThread::IO)) | 1833 if (BrowserThread::CurrentlyOn(BrowserThread::IO)) |
1824 return g_io_thread_application_locale.Get(); | 1834 return g_io_thread_application_locale.Get(); |
1825 return g_browser_process->GetApplicationLocale(); | 1835 return g_browser_process->GetApplicationLocale(); |
1826 } | 1836 } |
1827 | 1837 |
1828 std::string ChromeContentBrowserClient::GetAcceptLangs( | 1838 std::string ChromeContentBrowserClient::GetAcceptLangs( |
1829 content::BrowserContext* context) { | 1839 content::BrowserContext* context) { |
(...skipping 1515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3345 } | 3355 } |
3346 | 3356 |
3347 void ChromeContentBrowserClient:: | 3357 void ChromeContentBrowserClient:: |
3348 PerformExperimentalTaskSchedulerRedirections() { | 3358 PerformExperimentalTaskSchedulerRedirections() { |
3349 std::map<std::string, std::string> variation_params; | 3359 std::map<std::string, std::string> variation_params; |
3350 if (variations::GetVariationParams("BrowserScheduler", &variation_params)) { | 3360 if (variations::GetVariationParams("BrowserScheduler", &variation_params)) { |
3351 task_scheduler_util::MaybePerformBrowserTaskSchedulerRedirection( | 3361 task_scheduler_util::MaybePerformBrowserTaskSchedulerRedirection( |
3352 variation_params); | 3362 variation_params); |
3353 } | 3363 } |
3354 } | 3364 } |
OLD | NEW |