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

Side by Side Diff: chrome/service/service_utility_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/service/service_utility_process_host.h" 5 #include "chrome/service/service_utility_process_host.h"
6 6
7 #include "app/app_switches.h" 7 #include "app/app_switches.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 if (!CreateChannel()) 74 if (!CreateChannel())
75 return false; 75 return false;
76 76
77 FilePath exe_path = GetUtilityProcessCmd(); 77 FilePath exe_path = GetUtilityProcessCmd();
78 if (exe_path.empty()) { 78 if (exe_path.empty()) {
79 NOTREACHED() << "Unable to get utility process binary name."; 79 NOTREACHED() << "Unable to get utility process binary name.";
80 return false; 80 return false;
81 } 81 }
82 82
83 CommandLine cmd_line(exe_path); 83 CommandLine cmd_line(exe_path);
84 cmd_line.AppendSwitchWithValue(switches::kProcessType, 84 cmd_line.AppendSwitchASCII(switches::kProcessType, switches::kUtilityProcess);
85 switches::kUtilityProcess); 85 cmd_line.AppendSwitchASCII(switches::kProcessChannelID, channel_id());
86 cmd_line.AppendSwitchWithValue(switches::kProcessChannelID, channel_id());
87 cmd_line.AppendSwitch(switches::kLang); 86 cmd_line.AppendSwitch(switches::kLang);
88 87
89 return Launch(&cmd_line); 88 return Launch(&cmd_line);
90 } 89 }
91 90
92 FilePath ServiceUtilityProcessHost::GetUtilityProcessCmd() { 91 FilePath ServiceUtilityProcessHost::GetUtilityProcessCmd() {
93 return GetChildPath(true); 92 return GetChildPath(true);
94 } 93 }
95 94
96 void ServiceUtilityProcessHost::OnChildDied() { 95 void ServiceUtilityProcessHost::OnChildDied() {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 IPC_BEGIN_MESSAGE_MAP(ServiceUtilityProcessHost, message) 136 IPC_BEGIN_MESSAGE_MAP(ServiceUtilityProcessHost, message)
138 #if defined(OS_WIN) 137 #if defined(OS_WIN)
139 IPC_MESSAGE_HANDLER(UtilityHostMsg_RenderPDFPagesToMetafile_Succeeded, 138 IPC_MESSAGE_HANDLER(UtilityHostMsg_RenderPDFPagesToMetafile_Succeeded,
140 Client::OnRenderPDFPagesToMetafileSucceeded) 139 Client::OnRenderPDFPagesToMetafileSucceeded)
141 #endif // OS_WIN 140 #endif // OS_WIN
142 IPC_MESSAGE_HANDLER(UtilityHostMsg_RenderPDFPagesToMetafile_Failed, 141 IPC_MESSAGE_HANDLER(UtilityHostMsg_RenderPDFPagesToMetafile_Failed,
143 Client::OnRenderPDFPagesToMetafileFailed) 142 Client::OnRenderPDFPagesToMetafileFailed)
144 IPC_END_MESSAGE_MAP_EX() 143 IPC_END_MESSAGE_MAP_EX()
145 } 144 }
146 145
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698