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

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

Issue 3069014: Convert a bunch of easy AppendSwitchWithValue to *ASCII. (Closed)
Patch Set: fix Created 10 years, 4 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/browser_child_process_host.h" 5 #include "chrome/browser/browser_child_process_host.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/histogram.h" 9 #include "base/histogram.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 if (resource_dispatcher_host_) 81 if (resource_dispatcher_host_)
82 resource_dispatcher_host_->CancelRequestsForProcess(id()); 82 resource_dispatcher_host_->CancelRequestsForProcess(id());
83 } 83 }
84 84
85 // static 85 // static
86 void BrowserChildProcessHost::SetCrashReporterCommandLine( 86 void BrowserChildProcessHost::SetCrashReporterCommandLine(
87 CommandLine* command_line) { 87 CommandLine* command_line) {
88 #if defined(USE_LINUX_BREAKPAD) 88 #if defined(USE_LINUX_BREAKPAD)
89 const bool unattended = (getenv(env_vars::kHeadless) != NULL); 89 const bool unattended = (getenv(env_vars::kHeadless) != NULL);
90 if (unattended || GoogleUpdateSettings::GetCollectStatsConsent()) { 90 if (unattended || GoogleUpdateSettings::GetCollectStatsConsent()) {
91 command_line->AppendSwitchWithValue(switches::kEnableCrashReporter, 91 command_line->AppendSwitchASCII(switches::kEnableCrashReporter,
92 ASCIIToWide(google_update::posix_guid + 92 google_update::posix_guid +
93 "," + 93 "," +
94 base::GetLinuxDistro())); 94 base::GetLinuxDistro());
95 } 95 }
96 #elif defined(OS_MACOSX) 96 #elif defined(OS_MACOSX)
97 if (GoogleUpdateSettings::GetCollectStatsConsent()) 97 if (GoogleUpdateSettings::GetCollectStatsConsent())
98 command_line->AppendSwitchWithValue(switches::kEnableCrashReporter, 98 command_line->AppendSwitchASCII(switches::kEnableCrashReporter,
99 ASCIIToWide(google_update::posix_guid)); 99 google_update::posix_guid);
100 #endif // OS_MACOSX 100 #endif // OS_MACOSX
101 } 101 }
102 102
103 // static 103 // static
104 void BrowserChildProcessHost::TerminateAll() { 104 void BrowserChildProcessHost::TerminateAll() {
105 // Make a copy since the ChildProcessHost dtor mutates the original list. 105 // Make a copy since the ChildProcessHost dtor mutates the original list.
106 ChildProcessList copy = *(Singleton<ChildProcessList>::get()); 106 ChildProcessList copy = *(Singleton<ChildProcessList>::get());
107 STLDeleteElements(&copy); 107 STLDeleteElements(&copy);
108 } 108 }
109 109
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 218
219 return *iterator_; 219 return *iterator_;
220 } while (true); 220 } while (true);
221 221
222 return NULL; 222 return NULL;
223 } 223 }
224 224
225 bool BrowserChildProcessHost::Iterator::Done() { 225 bool BrowserChildProcessHost::Iterator::Done() {
226 return iterator_ == Singleton<ChildProcessList>::get()->end(); 226 return iterator_ == Singleton<ChildProcessList>::get()->end();
227 } 227 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698