OLD | NEW |
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/service/service_process_control.h" | 5 #include "chrome/browser/service/service_process_control.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/process_util.h" | 9 #include "base/process_util.h" |
10 #include "base/stl_util-inl.h" | 10 #include "base/stl_util-inl.h" |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 } else { | 231 } else { |
232 // If we don't have process handle that means launching the service process | 232 // If we don't have process handle that means launching the service process |
233 // has failed. | 233 // has failed. |
234 RunConnectDoneTasks(); | 234 RunConnectDoneTasks(); |
235 } | 235 } |
236 | 236 |
237 // We don't need the launcher anymore. | 237 // We don't need the launcher anymore. |
238 launcher_ = NULL; | 238 launcher_ = NULL; |
239 } | 239 } |
240 | 240 |
241 void ServiceProcessControl::OnMessageReceived(const IPC::Message& message) { | 241 bool ServiceProcessControl::OnMessageReceived(const IPC::Message& message) { |
| 242 bool handled = true;; |
242 IPC_BEGIN_MESSAGE_MAP(ServiceProcessControl, message) | 243 IPC_BEGIN_MESSAGE_MAP(ServiceProcessControl, message) |
243 IPC_MESSAGE_HANDLER(ServiceHostMsg_GoodDay, OnGoodDay) | 244 IPC_MESSAGE_HANDLER(ServiceHostMsg_GoodDay, OnGoodDay) |
244 IPC_MESSAGE_HANDLER(ServiceHostMsg_CloudPrintProxy_IsEnabled, | 245 IPC_MESSAGE_HANDLER(ServiceHostMsg_CloudPrintProxy_IsEnabled, |
245 OnCloudPrintProxyIsEnabled) | 246 OnCloudPrintProxyIsEnabled) |
246 IPC_MESSAGE_HANDLER(ServiceHostMsg_RemotingHost_HostInfo, | 247 IPC_MESSAGE_HANDLER(ServiceHostMsg_RemotingHost_HostInfo, |
247 OnRemotingHostInfo) | 248 OnRemotingHostInfo) |
| 249 IPC_MESSAGE_UNHANDLED(handled = false) |
248 IPC_END_MESSAGE_MAP() | 250 IPC_END_MESSAGE_MAP() |
| 251 return handled; |
249 } | 252 } |
250 | 253 |
251 void ServiceProcessControl::OnChannelConnected(int32 peer_pid) { | 254 void ServiceProcessControl::OnChannelConnected(int32 peer_pid) { |
252 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 255 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
253 RunConnectDoneTasks(); | 256 RunConnectDoneTasks(); |
254 } | 257 } |
255 | 258 |
256 void ServiceProcessControl::OnChannelError() { | 259 void ServiceProcessControl::OnChannelError() { |
257 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 260 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
258 channel_.reset(); | 261 channel_.reset(); |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 } | 336 } |
334 | 337 |
335 bool ServiceProcessControl::GetRemotingHostStatus( | 338 bool ServiceProcessControl::GetRemotingHostStatus( |
336 GetRemotingHostStatusCallback* status_callback) { | 339 GetRemotingHostStatusCallback* status_callback) { |
337 DCHECK(status_callback); | 340 DCHECK(status_callback); |
338 remoting_host_status_callback_.reset(status_callback); | 341 remoting_host_status_callback_.reset(status_callback); |
339 return Send(new ServiceMsg_GetRemotingHostInfo); | 342 return Send(new ServiceMsg_GetRemotingHostInfo); |
340 } | 343 } |
341 | 344 |
342 DISABLE_RUNNABLE_METHOD_REFCOUNT(ServiceProcessControl); | 345 DISABLE_RUNNABLE_METHOD_REFCOUNT(ServiceProcessControl); |
OLD | NEW |