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

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

Issue 2360143006: Stack sampling profiler: run the profiler in the GPU process on trunk builds (Closed)
Patch Set: . Created 4 years, 2 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/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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 #include "chrome/common/chrome_constants.h" 99 #include "chrome/common/chrome_constants.h"
100 #include "chrome/common/chrome_paths.h" 100 #include "chrome/common/chrome_paths.h"
101 #include "chrome/common/chrome_switches.h" 101 #include "chrome/common/chrome_switches.h"
102 #include "chrome/common/env_vars.h" 102 #include "chrome/common/env_vars.h"
103 #include "chrome/common/features.h" 103 #include "chrome/common/features.h"
104 #include "chrome/common/logging_chrome.h" 104 #include "chrome/common/logging_chrome.h"
105 #include "chrome/common/pepper_permission_util.h" 105 #include "chrome/common/pepper_permission_util.h"
106 #include "chrome/common/pref_names.h" 106 #include "chrome/common/pref_names.h"
107 #include "chrome/common/render_messages.h" 107 #include "chrome/common/render_messages.h"
108 #include "chrome/common/secure_origin_whitelist.h" 108 #include "chrome/common/secure_origin_whitelist.h"
109 #include "chrome/common/stack_sampling_configuration.h"
109 #include "chrome/common/url_constants.h" 110 #include "chrome/common/url_constants.h"
110 #include "chrome/grit/browser_resources.h" 111 #include "chrome/grit/browser_resources.h"
111 #include "chrome/grit/generated_resources.h" 112 #include "chrome/grit/generated_resources.h"
112 #include "chrome/installer/util/google_update_settings.h" 113 #include "chrome/installer/util/google_update_settings.h"
113 #include "chromeos/chromeos_constants.h" 114 #include "chromeos/chromeos_constants.h"
114 #include "components/autofill/content/browser/content_autofill_driver_factory.h" 115 #include "components/autofill/content/browser/content_autofill_driver_factory.h"
115 #include "components/autofill/core/common/autofill_switches.h" 116 #include "components/autofill/core/common/autofill_switches.h"
116 #include "components/cdm/browser/cdm_message_filter_android.h" 117 #include "components/cdm/browser/cdm_message_filter_android.h"
117 #include "components/cloud_devices/common/cloud_devices_switches.h" 118 #include "components/cloud_devices/common/cloud_devices_switches.h"
118 #include "components/content_settings/core/browser/content_settings_utils.h" 119 #include "components/content_settings/core/browser/content_settings_utils.h"
(...skipping 1590 matching lines...) Expand 10 before | Expand all | Expand 10 after
1709 if (browser_command_line.HasSwitch(switches::kIgnoreGpuBlacklist) && 1710 if (browser_command_line.HasSwitch(switches::kIgnoreGpuBlacklist) &&
1710 !command_line->HasSwitch(switches::kDisableBreakpad)) 1711 !command_line->HasSwitch(switches::kDisableBreakpad))
1711 command_line->AppendSwitch(switches::kDisableBreakpad); 1712 command_line->AppendSwitch(switches::kDisableBreakpad);
1712 } 1713 }
1713 1714
1714 // The command line switch kEnableBenchmarking needs to be specified along 1715 // The command line switch kEnableBenchmarking needs to be specified along
1715 // with the kEnableStatsTable switch to ensure that the stats table global 1716 // with the kEnableStatsTable switch to ensure that the stats table global
1716 // is initialized correctly. 1717 // is initialized correctly.
1717 if (command_line->HasSwitch(switches::kEnableBenchmarking)) 1718 if (command_line->HasSwitch(switches::kEnableBenchmarking))
1718 DCHECK(command_line->HasSwitch(switches::kEnableStatsTable)); 1719 DCHECK(command_line->HasSwitch(switches::kEnableStatsTable));
1720
1721 StackSamplingConfiguration::Get()->AppendCommandLineSwitchForChildProcess(
1722 process_type,
1723 command_line);
1719 } 1724 }
1720 1725
1721 std::string ChromeContentBrowserClient::GetApplicationLocale() { 1726 std::string ChromeContentBrowserClient::GetApplicationLocale() {
1722 if (BrowserThread::CurrentlyOn(BrowserThread::IO)) 1727 if (BrowserThread::CurrentlyOn(BrowserThread::IO))
1723 return g_io_thread_application_locale.Get(); 1728 return g_io_thread_application_locale.Get();
1724 return g_browser_process->GetApplicationLocale(); 1729 return g_browser_process->GetApplicationLocale();
1725 } 1730 }
1726 1731
1727 std::string ChromeContentBrowserClient::GetAcceptLangs( 1732 std::string ChromeContentBrowserClient::GetAcceptLangs(
1728 content::BrowserContext* context) { 1733 content::BrowserContext* context) {
(...skipping 1471 matching lines...) Expand 10 before | Expand all | Expand 10 after
3200 if (channel <= kMaxDisableEncryptionChannel) { 3205 if (channel <= kMaxDisableEncryptionChannel) {
3201 static const char* const kWebRtcDevSwitchNames[] = { 3206 static const char* const kWebRtcDevSwitchNames[] = {
3202 switches::kDisableWebRtcEncryption, 3207 switches::kDisableWebRtcEncryption,
3203 }; 3208 };
3204 to_command_line->CopySwitchesFrom(from_command_line, 3209 to_command_line->CopySwitchesFrom(from_command_line,
3205 kWebRtcDevSwitchNames, 3210 kWebRtcDevSwitchNames,
3206 arraysize(kWebRtcDevSwitchNames)); 3211 arraysize(kWebRtcDevSwitchNames));
3207 } 3212 }
3208 } 3213 }
3209 #endif // defined(ENABLE_WEBRTC) 3214 #endif // defined(ENABLE_WEBRTC)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698