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/service/service_ipc_server.h" | 5 #include "chrome/service/service_ipc_server.h" |
6 | 6 |
7 #include "chrome/common/service_messages.h" | 7 #include "chrome/common/service_messages.h" |
8 #include "chrome/service/cloud_print/cloud_print_proxy.h" | 8 #include "chrome/service/cloud_print/cloud_print_proxy.h" |
9 #include "chrome/service/service_process.h" | 9 #include "chrome/service/service_process.h" |
10 #include "ipc/ipc_logging.h" | 10 #include "ipc/ipc_logging.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 void ServiceIPCServer::OnEnableCloudPrintProxy(const std::string& lsid) { | 86 void ServiceIPCServer::OnEnableCloudPrintProxy(const std::string& lsid) { |
87 g_service_process->GetCloudPrintProxy()->EnableForUser(lsid); | 87 g_service_process->GetCloudPrintProxy()->EnableForUser(lsid); |
88 } | 88 } |
89 | 89 |
90 void ServiceIPCServer::OnEnableCloudPrintProxyWithTokens( | 90 void ServiceIPCServer::OnEnableCloudPrintProxyWithTokens( |
91 const std::string& cloud_print_token, const std::string& talk_token) { | 91 const std::string& cloud_print_token, const std::string& talk_token) { |
92 // TODO(sanjeevr): Implement this. | 92 // TODO(sanjeevr): Implement this. |
93 NOTIMPLEMENTED(); | 93 NOTIMPLEMENTED(); |
94 } | 94 } |
95 | 95 |
96 void ServiceIPCServer::OnIsCloudPrintProxyEnabled(bool* is_enabled, | 96 void ServiceIPCServer::OnIsCloudPrintProxyEnabled() { |
97 std::string* email) { | 97 std::string email; |
98 *is_enabled = g_service_process->GetCloudPrintProxy()->IsEnabled(email); | 98 bool is_enabled = g_service_process->GetCloudPrintProxy()->IsEnabled(&email); |
| 99 channel_->Send(new ServiceHostMsg_CloudPrintProxy_IsEnabled(is_enabled, |
| 100 email)); |
99 } | 101 } |
100 | 102 |
101 void ServiceIPCServer::OnEnableRemotingWithTokens( | 103 void ServiceIPCServer::OnEnableRemotingWithTokens( |
102 const std::string& login, | 104 const std::string& login, |
103 const std::string& remoting_token, | 105 const std::string& remoting_token, |
104 const std::string& talk_token) { | 106 const std::string& talk_token) { |
105 #if defined(ENABLE_REMOTING) | 107 #if defined(ENABLE_REMOTING) |
106 g_service_process->EnableChromotingHostWithTokens(login, remoting_token, | 108 g_service_process->EnableChromotingHostWithTokens(login, remoting_token, |
107 talk_token); | 109 talk_token); |
108 #endif | 110 #endif |
109 } | 111 } |
110 | 112 |
111 void ServiceIPCServer::OnDisableCloudPrintProxy() { | 113 void ServiceIPCServer::OnDisableCloudPrintProxy() { |
112 g_service_process->GetCloudPrintProxy()->DisableForUser(); | 114 g_service_process->GetCloudPrintProxy()->DisableForUser(); |
113 } | 115 } |
114 | 116 |
115 void ServiceIPCServer::OnHello() { | 117 void ServiceIPCServer::OnHello() { |
116 channel_->Send(new ServiceHostMsg_GoodDay()); | 118 channel_->Send(new ServiceHostMsg_GoodDay()); |
117 } | 119 } |
118 | 120 |
119 void ServiceIPCServer::OnShutdown() { | 121 void ServiceIPCServer::OnShutdown() { |
120 g_service_process->Shutdown(); | 122 g_service_process->Shutdown(); |
121 } | 123 } |
OLD | NEW |