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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 path = path.Append(FILE_PATH_LITERAL("MacOS")); | 139 path = path.Append(FILE_PATH_LITERAL("MacOS")); |
140 path = path.Append(child_exe_name); | 140 path = path.Append(child_exe_name); |
141 | 141 |
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 const bool unattended = (getenv("CHROME_HEADLESS") != NULL); | 149 if (GoogleUpdateSettings::GetCollectStatsConsent()) { |
150 if (unattended || GoogleUpdateSettings::GetCollectStatsConsent()) { | |
151 #if defined(OS_LINUX) | 150 #if defined(OS_LINUX) |
152 command_line->AppendSwitchWithValue(switches::kEnableCrashReporter, | 151 command_line->AppendSwitchWithValue(switches::kEnableCrashReporter, |
153 ASCIIToWide(google_update::linux_guid + | 152 ASCIIToWide(google_update::linux_guid + |
154 "," + | 153 "," + |
155 base::GetLinuxDistro())); | 154 base::GetLinuxDistro())); |
156 #else // !OS_LINUX | 155 #else // !OS_LINUX |
157 command_line->AppendSwitch(switches::kEnableCrashReporter); | 156 command_line->AppendSwitch(switches::kEnableCrashReporter); |
158 #endif // !OS_LINUX | 157 #endif // !OS_LINUX |
159 } | 158 } |
160 #endif // OS_POSIX | 159 #endif // OS_POSIX |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 | 299 |
301 return *iterator_; | 300 return *iterator_; |
302 } while (true); | 301 } while (true); |
303 | 302 |
304 return NULL; | 303 return NULL; |
305 } | 304 } |
306 | 305 |
307 bool ChildProcessHost::Iterator::Done() { | 306 bool ChildProcessHost::Iterator::Done() { |
308 return iterator_ == Singleton<ChildProcessList>::get()->end(); | 307 return iterator_ == Singleton<ChildProcessList>::get()->end(); |
309 } | 308 } |
OLD | NEW |