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

Unified Diff: chrome/service/service_utility_process_host.cc

Issue 5947002: As the first step in an effort to improve robustness of the cloud print proxy... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Review comments Created 10 years 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_utility_process_host.h ('k') | chrome/utility/utility_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/service/service_utility_process_host.cc
===================================================================
--- chrome/service/service_utility_process_host.cc (revision 69859)
+++ chrome/service/service_utility_process_host.cc (working copy)
@@ -47,7 +47,7 @@
return false;
}
- if (!StartProcess(scratch_metafile_dir_->path()))
+ if (!StartProcess(false, scratch_metafile_dir_->path()))
return false;
ScopedHandle pdf_file(
@@ -76,7 +76,17 @@
#endif // !defined(OS_WIN)
}
-bool ServiceUtilityProcessHost::StartProcess(const FilePath& exposed_dir) {
+bool ServiceUtilityProcessHost::StartGetPrinterCapsAndDefaults(
+ const std::string& printer_name) {
+ FilePath exposed_path;
+ if (!StartProcess(true, exposed_path))
+ return false;
+ waiting_for_reply_ = true;
+ return Send(new UtilityMsg_GetPrinterCapsAndDefaults(printer_name));
+}
+
+bool ServiceUtilityProcessHost::StartProcess(bool no_sandbox,
+ const FilePath& exposed_dir) {
// Name must be set or metrics_service will crash in any test which
// launches a UtilityProcessHost.
set_name(L"utility process");
@@ -95,7 +105,7 @@
cmd_line.AppendSwitchASCII(switches::kProcessChannelID, channel_id());
cmd_line.AppendSwitch(switches::kLang);
- return Launch(&cmd_line, exposed_dir);
+ return Launch(&cmd_line, no_sandbox, exposed_dir);
}
FilePath ServiceUtilityProcessHost::GetUtilityProcessCmd() {
@@ -167,6 +177,10 @@
IPC_BEGIN_MESSAGE_MAP(ServiceUtilityProcessHost, message)
IPC_MESSAGE_HANDLER(UtilityHostMsg_RenderPDFPagesToMetafile_Failed,
Client::OnRenderPDFPagesToMetafileFailed)
+ IPC_MESSAGE_HANDLER(UtilityHostMsg_GetPrinterCapsAndDefaults_Succeeded,
+ Client::OnGetPrinterCapsAndDefaultsSucceeded)
+ IPC_MESSAGE_HANDLER(UtilityHostMsg_GetPrinterCapsAndDefaults_Failed,
+ Client::OnGetPrinterCapsAndDefaultsFailed)
IPC_END_MESSAGE_MAP_EX()
}
« no previous file with comments | « chrome/service/service_utility_process_host.h ('k') | chrome/utility/utility_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698