| 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 #include "components/prefs/pref_service.h" | 143 #include "components/prefs/pref_service.h" |
| 144 #include "components/prefs/scoped_user_pref_update.h" | 144 #include "components/prefs/scoped_user_pref_update.h" |
| 145 #include "components/rappor/public/rappor_utils.h" | 145 #include "components/rappor/public/rappor_utils.h" |
| 146 #include "components/rappor/rappor_recorder_impl.h" | 146 #include "components/rappor/rappor_recorder_impl.h" |
| 147 #include "components/rappor/rappor_service_impl.h" | 147 #include "components/rappor/rappor_service_impl.h" |
| 148 #include "components/safe_browsing_db/safe_browsing_prefs.h" | 148 #include "components/safe_browsing_db/safe_browsing_prefs.h" |
| 149 #include "components/security_interstitials/core/ssl_error_ui.h" | 149 #include "components/security_interstitials/core/ssl_error_ui.h" |
| 150 #include "components/signin/core/common/profile_management_switches.h" | 150 #include "components/signin/core/common/profile_management_switches.h" |
| 151 #include "components/spellcheck/spellcheck_build_features.h" | 151 #include "components/spellcheck/spellcheck_build_features.h" |
| 152 #include "components/startup_metric_utils/browser/startup_metric_host_impl.h" | 152 #include "components/startup_metric_utils/browser/startup_metric_host_impl.h" |
| 153 #include "components/task_scheduler_util/common/variations_util.h" |
| 153 #include "components/task_scheduler_util/initialization/browser_util.h" | 154 #include "components/task_scheduler_util/initialization/browser_util.h" |
| 154 #include "components/task_scheduler_util/variations/browser_variations_util.h" | 155 #include "components/task_scheduler_util/variations/browser_variations_util.h" |
| 155 #include "components/translate/core/common/translate_switches.h" | 156 #include "components/translate/core/common/translate_switches.h" |
| 156 #include "components/url_formatter/url_fixer.h" | 157 #include "components/url_formatter/url_fixer.h" |
| 157 #include "components/variations/variations_associated_data.h" | 158 #include "components/variations/variations_associated_data.h" |
| 158 #include "components/version_info/version_info.h" | 159 #include "components/version_info/version_info.h" |
| 159 #include "content/public/browser/browser_child_process_host.h" | 160 #include "content/public/browser/browser_child_process_host.h" |
| 160 #include "content/public/browser/browser_main_parts.h" | 161 #include "content/public/browser/browser_main_parts.h" |
| 161 #include "content/public/browser/browser_ppapi_host.h" | 162 #include "content/public/browser/browser_ppapi_host.h" |
| 162 #include "content/public/browser/browser_thread.h" | 163 #include "content/public/browser/browser_thread.h" |
| (...skipping 1648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1811 | 1812 |
| 1812 // The command line switch kEnableBenchmarking needs to be specified along | 1813 // The command line switch kEnableBenchmarking needs to be specified along |
| 1813 // with the kEnableStatsTable switch to ensure that the stats table global | 1814 // with the kEnableStatsTable switch to ensure that the stats table global |
| 1814 // is initialized correctly. | 1815 // is initialized correctly. |
| 1815 if (command_line->HasSwitch(switches::kEnableBenchmarking)) | 1816 if (command_line->HasSwitch(switches::kEnableBenchmarking)) |
| 1816 DCHECK(command_line->HasSwitch(switches::kEnableStatsTable)); | 1817 DCHECK(command_line->HasSwitch(switches::kEnableStatsTable)); |
| 1817 | 1818 |
| 1818 StackSamplingConfiguration::Get()->AppendCommandLineSwitchForChildProcess( | 1819 StackSamplingConfiguration::Get()->AppendCommandLineSwitchForChildProcess( |
| 1819 process_type, | 1820 process_type, |
| 1820 command_line); | 1821 command_line); |
| 1822 |
| 1823 if (process_type == switches::kRendererProcess) { |
| 1824 task_scheduler_util::AddVariationParamsToCommandLine("Renderer", |
| 1825 command_line); |
| 1826 } |
| 1821 } | 1827 } |
| 1822 | 1828 |
| 1823 std::string ChromeContentBrowserClient::GetApplicationLocale() { | 1829 std::string ChromeContentBrowserClient::GetApplicationLocale() { |
| 1824 if (BrowserThread::CurrentlyOn(BrowserThread::IO)) | 1830 if (BrowserThread::CurrentlyOn(BrowserThread::IO)) |
| 1825 return g_io_thread_application_locale.Get(); | 1831 return g_io_thread_application_locale.Get(); |
| 1826 return g_browser_process->GetApplicationLocale(); | 1832 return g_browser_process->GetApplicationLocale(); |
| 1827 } | 1833 } |
| 1828 | 1834 |
| 1829 std::string ChromeContentBrowserClient::GetAcceptLangs( | 1835 std::string ChromeContentBrowserClient::GetAcceptLangs( |
| 1830 content::BrowserContext* context) { | 1836 content::BrowserContext* context) { |
| (...skipping 1531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3362 bool ChromeContentBrowserClient::ShouldRedirectDOMStorageTaskRunner() { | 3368 bool ChromeContentBrowserClient::ShouldRedirectDOMStorageTaskRunner() { |
| 3363 return variations::GetVariationParamValue( | 3369 return variations::GetVariationParamValue( |
| 3364 "BrowserScheduler", "RedirectDOMStorageTaskRunner") == "true"; | 3370 "BrowserScheduler", "RedirectDOMStorageTaskRunner") == "true"; |
| 3365 } | 3371 } |
| 3366 | 3372 |
| 3367 bool ChromeContentBrowserClient:: | 3373 bool ChromeContentBrowserClient:: |
| 3368 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { | 3374 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { |
| 3369 return variations::GetVariationParamValue( | 3375 return variations::GetVariationParamValue( |
| 3370 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; | 3376 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; |
| 3371 } | 3377 } |
| OLD | NEW |