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

Unified Diff: cloud_print/service/win/service_controller.cc

Issue 13039002: Send data back from service using IPC, not file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | « cloud_print/service/win/service_controller.h ('k') | cloud_print/service/win/service_ipc_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cloud_print/service/win/service_controller.cc
diff --git a/cloud_print/service/win/service_controller.cc b/cloud_print/service/win/service_controller.cc
index 428f2829b0a83c8cecbf509355c574ac40b7af78..e3e05e713ecf6efb5734264760686dc1ea2bfffc 100644
--- a/cloud_print/service/win/service_controller.cc
+++ b/cloud_print/service/win/service_controller.cc
@@ -1,5 +1,5 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "cloud_print/service/win/service_controller.h"
@@ -114,7 +114,8 @@ HRESULT ServiceController::StopService() {
HRESULT ServiceController::InstallService(const string16& user,
const string16& password,
const std::string& run_switch,
- const base::FilePath& user_data_dir) {
+ const base::FilePath& user_data_dir,
+ bool auto_start) {
// TODO(vitalybuka): consider "lite" version if we don't want unregister
// printers here.
HRESULT hr = UninstallService();
@@ -152,9 +153,10 @@ HRESULT ServiceController::InstallService(const string16& user,
ServiceHandle service(
::CreateService(
scm, name_.c_str(), name_.c_str(), SERVICE_ALL_ACCESS,
- SERVICE_WIN32_OWN_PROCESS, SERVICE_AUTO_START, SERVICE_ERROR_NORMAL,
- command_line.GetCommandLineString().c_str(), NULL, NULL, NULL,
- user.empty() ? NULL : user.c_str(),
+ SERVICE_WIN32_OWN_PROCESS,
+ auto_start ? SERVICE_AUTO_START : SERVICE_DEMAND_START,
+ SERVICE_ERROR_NORMAL, command_line.GetCommandLineString().c_str(),
+ NULL, NULL, NULL, user.empty() ? NULL : user.c_str(),
password.empty() ? NULL : password.c_str()));
if (!service.IsValid()) {
« no previous file with comments | « cloud_print/service/win/service_controller.h ('k') | cloud_print/service/win/service_ipc_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698