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

Unified Diff: chrome/service/service_ipc_server.cc

Issue 208653010: Use service process to collect printers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/service/service_ipc_server.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/service/service_ipc_server.cc
diff --git a/chrome/service/service_ipc_server.cc b/chrome/service/service_ipc_server.cc
index b700c57e0369e27f07883313bf96cdf28fcbf8fd..987f8060fd6cde8f3814353eed47dd13c1043a17 100644
--- a/chrome/service/service_ipc_server.cc
+++ b/chrome/service/service_ipc_server.cc
@@ -100,6 +100,7 @@ bool ServiceIPCServer::OnMessageReceived(const IPC::Message& msg) {
IPC_MESSAGE_HANDLER(ServiceMsg_GetCloudPrintProxyInfo,
OnGetCloudPrintProxyInfo)
IPC_MESSAGE_HANDLER(ServiceMsg_GetHistograms, OnGetHistograms)
+ IPC_MESSAGE_HANDLER(ServiceMsg_GetPrinters, OnGetPrinters)
IPC_MESSAGE_HANDLER(ServiceMsg_Shutdown, OnShutdown);
IPC_MESSAGE_HANDLER(ServiceMsg_UpdateAvailable, OnUpdateAvailable);
IPC_MESSAGE_UNHANDLED(handled = false)
@@ -132,6 +133,12 @@ void ServiceIPCServer::OnGetHistograms() {
channel_->Send(new ServiceHostMsg_Histograms(deltas));
}
+void ServiceIPCServer::OnGetPrinters() {
+ std::vector<std::string> printers;
+ g_service_process->GetCloudPrintProxy()->GetPrinters(&printers);
+ channel_->Send(new ServiceHostMsg_Printers(printers));
+}
+
void ServiceIPCServer::OnDisableCloudPrintProxy() {
// User disabled CloudPrint proxy explicitly. Delete printers
// registered from this proxy and disable proxy.
« no previous file with comments | « chrome/service/service_ipc_server.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698