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 <set> | 7 #include <set> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 1220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1231 return false; | 1231 return false; |
1232 } | 1232 } |
1233 return true; | 1233 return true; |
1234 } | 1234 } |
1235 | 1235 |
1236 } // namespace | 1236 } // namespace |
1237 | 1237 |
1238 void ChromeContentBrowserClient::AppendExtraCommandLineSwitches( | 1238 void ChromeContentBrowserClient::AppendExtraCommandLineSwitches( |
1239 base::CommandLine* command_line, | 1239 base::CommandLine* command_line, |
1240 int child_process_id) { | 1240 int child_process_id) { |
1241 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 1241 #if defined(OS_MACOSX) |
| 1242 scoped_ptr<metrics::ClientInfo> client_info = |
| 1243 GoogleUpdateSettings::LoadMetricsClientInfo(); |
| 1244 if (client_info) { |
| 1245 command_line->AppendSwitchASCII(switches::kMetricsClientID, |
| 1246 client_info->client_id); |
| 1247 } |
| 1248 #elif defined(OS_POSIX) |
1242 if (breakpad::IsCrashReporterEnabled()) { | 1249 if (breakpad::IsCrashReporterEnabled()) { |
1243 scoped_ptr<metrics::ClientInfo> client_info = | 1250 scoped_ptr<metrics::ClientInfo> client_info = |
1244 GoogleUpdateSettings::LoadMetricsClientInfo(); | 1251 GoogleUpdateSettings::LoadMetricsClientInfo(); |
1245 command_line->AppendSwitchASCII(switches::kEnableCrashReporter, | 1252 command_line->AppendSwitchASCII(switches::kEnableCrashReporter, |
1246 client_info ? client_info->client_id | 1253 client_info ? client_info->client_id |
1247 : std::string()); | 1254 : std::string()); |
1248 } | 1255 } |
1249 #endif // defined(OS_POSIX) && !defined(OS_MACOSX) | 1256 #endif |
1250 | 1257 |
1251 if (logging::DialogsAreSuppressed()) | 1258 if (logging::DialogsAreSuppressed()) |
1252 command_line->AppendSwitch(switches::kNoErrorDialogs); | 1259 command_line->AppendSwitch(switches::kNoErrorDialogs); |
1253 | 1260 |
1254 std::string process_type = | 1261 std::string process_type = |
1255 command_line->GetSwitchValueASCII(switches::kProcessType); | 1262 command_line->GetSwitchValueASCII(switches::kProcessType); |
1256 const base::CommandLine& browser_command_line = | 1263 const base::CommandLine& browser_command_line = |
1257 *base::CommandLine::ForCurrentProcess(); | 1264 *base::CommandLine::ForCurrentProcess(); |
1258 | 1265 |
1259 static const char* const kCommonSwitchNames[] = { | 1266 static const char* const kCommonSwitchNames[] = { |
(...skipping 1313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2573 switches::kDisableWebRtcEncryption, | 2580 switches::kDisableWebRtcEncryption, |
2574 }; | 2581 }; |
2575 to_command_line->CopySwitchesFrom(from_command_line, | 2582 to_command_line->CopySwitchesFrom(from_command_line, |
2576 kWebRtcDevSwitchNames, | 2583 kWebRtcDevSwitchNames, |
2577 arraysize(kWebRtcDevSwitchNames)); | 2584 arraysize(kWebRtcDevSwitchNames)); |
2578 } | 2585 } |
2579 } | 2586 } |
2580 #endif // defined(ENABLE_WEBRTC) | 2587 #endif // defined(ENABLE_WEBRTC) |
2581 | 2588 |
2582 } // namespace chrome | 2589 } // namespace chrome |
OLD | NEW |