| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/printing/cloud_print/virtual_driver_install_helper.h" | 5 #include "chrome/browser/printing/cloud_print/virtual_driver_install_helper.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "chrome/browser/service/service_process_control.h" | 8 #include "chrome/browser/service/service_process_control.h" |
| 9 #include "chrome/common/service_messages.h" | 9 #include "chrome/common/service_messages.h" |
| 10 | 10 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 new VirtualDriverInstallHelper(); | 24 new VirtualDriverInstallHelper(); |
| 25 ServiceProcessControl::GetInstance()->Launch( | 25 ServiceProcessControl::GetInstance()->Launch( |
| 26 base::Bind(&VirtualDriverInstallHelper::UninstallVirtualDriverTask, | 26 base::Bind(&VirtualDriverInstallHelper::UninstallVirtualDriverTask, |
| 27 help.get()), | 27 help.get()), |
| 28 base::Closure()); | 28 base::Closure()); |
| 29 } | 29 } |
| 30 | 30 |
| 31 void VirtualDriverInstallHelper::InstallVirtualDriverTask() { | 31 void VirtualDriverInstallHelper::InstallVirtualDriverTask() { |
| 32 ServiceProcessControl* process_control = | 32 ServiceProcessControl* process_control = |
| 33 ServiceProcessControl::GetInstance(); | 33 ServiceProcessControl::GetInstance(); |
| 34 DCHECK(process_control->is_connected()); | 34 DCHECK(process_control->IsConnected()); |
| 35 process_control->Send(new ServiceMsg_EnableVirtualDriver()); | 35 process_control->Send(new ServiceMsg_EnableVirtualDriver()); |
| 36 } | 36 } |
| 37 | 37 |
| 38 void VirtualDriverInstallHelper::UninstallVirtualDriverTask() { | 38 void VirtualDriverInstallHelper::UninstallVirtualDriverTask() { |
| 39 ServiceProcessControl* process_control = | 39 ServiceProcessControl* process_control = |
| 40 ServiceProcessControl::GetInstance(); | 40 ServiceProcessControl::GetInstance(); |
| 41 DCHECK(process_control->is_connected()); | 41 DCHECK(process_control->IsConnected()); |
| 42 process_control->Send(new ServiceMsg_DisableVirtualDriver()); | 42 process_control->Send(new ServiceMsg_DisableVirtualDriver()); |
| 43 } | 43 } |
| 44 | 44 |
| 45 } // namespace cloud_print | 45 } // namespace cloud_print |
| 46 | |
| OLD | NEW |