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

Unified Diff: chrome/service/service_utility_process_host.cc

Issue 1920793005: Merge to M51: Cloud Print Proxy: Delete print jobs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Created 4 years, 8 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/cloud_print/printer_job_handler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/service/service_utility_process_host.cc
diff --git a/chrome/service/service_utility_process_host.cc b/chrome/service/service_utility_process_host.cc
index 8389a10a96a5497a437107e172aef7ae7d3e56ac..f3843c10e620d1df6729639dcc1bdaf57b8ebf4e 100644
--- a/chrome/service/service_utility_process_host.cc
+++ b/chrome/service/service_utility_process_host.cc
@@ -24,6 +24,7 @@
#include "build/build_config.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/chrome_utility_printing_messages.h"
+#include "components/startup_metric_utils/common/pre_read_field_trial_utils_win.h"
#include "content/public/common/child_process_host.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/result_codes.h"
@@ -35,10 +36,6 @@
#include "sandbox/win/src/sandbox_types.h"
#include "ui/base/ui_base_switches.h"
-#if defined(OS_WIN)
-#include "components/startup_metric_utils/common/pre_read_field_trial_utils_win.h"
-#endif // defined(OS_WIN)
-
namespace {
using content::ChildProcessHost;
@@ -180,7 +177,8 @@ bool ServiceUtilityProcessHost::StartRenderPDFPagesToMetafile(
const printing::PdfRenderSettings& render_settings) {
ReportUmaEvent(SERVICE_UTILITY_METAFILE_REQUEST);
start_time_ = base::Time::Now();
- base::File pdf_file(pdf_path, base::File::FLAG_OPEN | base::File::FLAG_READ);
+ base::File pdf_file(pdf_path, base::File::FLAG_OPEN | base::File::FLAG_READ |
+ base::File::FLAG_DELETE_ON_CLOSE);
if (!pdf_file.IsValid() || !StartProcess(false))
return false;
@@ -230,10 +228,8 @@ bool ServiceUtilityProcessHost::StartProcess(bool no_sandbox) {
cmd_line.AppendSwitchASCII(switches::kProcessChannelID, channel_id);
cmd_line.AppendSwitch(switches::kLang);
-#if defined(OS_WIN)
if (startup_metric_utils::GetPreReadOptions().use_prefetch_argument)
cmd_line.AppendArg(switches::kPrefetchArgumentOther);
-#endif // defined(OS_WIN)
if (Launch(&cmd_line, no_sandbox)) {
ReportUmaEvent(SERVICE_UTILITY_STARTED);
@@ -264,12 +260,7 @@ bool ServiceUtilityProcessHost::Send(IPC::Message* msg) {
}
base::FilePath ServiceUtilityProcessHost::GetUtilityProcessCmd() {
-#if defined(OS_LINUX)
- int flags = ChildProcessHost::CHILD_ALLOW_SELF;
-#else
- int flags = ChildProcessHost::CHILD_NORMAL;
-#endif
- return ChildProcessHost::GetChildPath(flags);
+ return ChildProcessHost::GetChildPath(ChildProcessHost::CHILD_NORMAL);
}
void ServiceUtilityProcessHost::OnChildDisconnected() {
« no previous file with comments | « chrome/service/cloud_print/printer_job_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698