| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/common/child_process_host.h" | 5 #include "chrome/common/child_process_host.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 #include "chrome/installer/util/google_update_settings.h" | 24 #include "chrome/installer/util/google_update_settings.h" |
| 25 #include "ipc/ipc_logging.h" | 25 #include "ipc/ipc_logging.h" |
| 26 | 26 |
| 27 #if defined(OS_LINUX) | 27 #if defined(OS_LINUX) |
| 28 #include "base/linux_util.h" | 28 #include "base/linux_util.h" |
| 29 | 29 |
| 30 // This is defined in chrome/browser/google_update_settings_linux.cc. It's the | 30 // This is defined in chrome/browser/google_update_settings_linux.cc. It's the |
| 31 // static string containing the user's unique GUID. We send this in the crash | 31 // static string containing the user's unique GUID. We send this in the crash |
| 32 // report. | 32 // report. |
| 33 namespace google_update { | 33 namespace google_update { |
| 34 extern std::string linux_guid; | 34 extern std::string posix_guid; |
| 35 } // namespace google_update | 35 } // namespace google_update |
| 36 #endif // OS_LINUX | 36 #endif // OS_LINUX |
| 37 | 37 |
| 38 | 38 |
| 39 namespace { | 39 namespace { |
| 40 | 40 |
| 41 typedef std::list<ChildProcessHost*> ChildProcessList; | 41 typedef std::list<ChildProcessHost*> ChildProcessList; |
| 42 | 42 |
| 43 // The NotificationTask is used to notify about plugin process connection/ | 43 // The NotificationTask is used to notify about plugin process connection/ |
| 44 // disconnection. It is needed because the notifications in the | 44 // disconnection. It is needed because the notifications in the |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 return path.ToWStringHack(); | 142 return path.ToWStringHack(); |
| 143 #endif // OS_MACOSX | 143 #endif // OS_MACOSX |
| 144 } | 144 } |
| 145 | 145 |
| 146 // static | 146 // static |
| 147 void ChildProcessHost::SetCrashReporterCommandLine(CommandLine* command_line) { | 147 void ChildProcessHost::SetCrashReporterCommandLine(CommandLine* command_line) { |
| 148 #if defined(OS_POSIX) | 148 #if defined(OS_POSIX) |
| 149 if (GoogleUpdateSettings::GetCollectStatsConsent()) { | 149 if (GoogleUpdateSettings::GetCollectStatsConsent()) { |
| 150 #if defined(OS_LINUX) | 150 #if defined(OS_LINUX) |
| 151 command_line->AppendSwitchWithValue(switches::kEnableCrashReporter, | 151 command_line->AppendSwitchWithValue(switches::kEnableCrashReporter, |
| 152 ASCIIToWide(google_update::linux_guid + | 152 ASCIIToWide(google_update::posix_guid + |
| 153 "," + | 153 "," + |
| 154 base::GetLinuxDistro())); | 154 base::GetLinuxDistro())); |
| 155 #else // !OS_LINUX | 155 #else // !OS_LINUX |
| 156 command_line->AppendSwitch(switches::kEnableCrashReporter); | 156 command_line->AppendSwitch(switches::kEnableCrashReporter); |
| 157 #endif // !OS_LINUX | 157 #endif // !OS_LINUX |
| 158 } | 158 } |
| 159 #endif // OS_POSIX | 159 #endif // OS_POSIX |
| 160 } | 160 } |
| 161 | 161 |
| 162 bool ChildProcessHost::CreateChannel() { | 162 bool ChildProcessHost::CreateChannel() { |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 | 299 |
| 300 return *iterator_; | 300 return *iterator_; |
| 301 } while (true); | 301 } while (true); |
| 302 | 302 |
| 303 return NULL; | 303 return NULL; |
| 304 } | 304 } |
| 305 | 305 |
| 306 bool ChildProcessHost::Iterator::Done() { | 306 bool ChildProcessHost::Iterator::Done() { |
| 307 return iterator_ == Singleton<ChildProcessList>::get()->end(); | 307 return iterator_ == Singleton<ChildProcessList>::get()->end(); |
| 308 } | 308 } |
| OLD | NEW |