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

Unified Diff: chrome/service/service_process.cc

Issue 7485011: Virtual Cloud Print Driver for Mac. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fixed copyright Created 9 years, 4 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_process.h ('k') | cloud_print/virtual_driver/posix/backend.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/service/service_process.cc
diff --git a/chrome/service/service_process.cc b/chrome/service/service_process.cc
index e5e04944bd858978fc3c38ac0abac6b0f5fed6de..8fc8e95de3187ddbeea61e139bbbe6747a36c172 100644
--- a/chrome/service/service_process.cc
+++ b/chrome/service/service_process.cc
@@ -192,6 +192,16 @@ bool ServiceProcess::Initialize(MessageLoopForUI* message_loop,
if (cloud_print_proxy_enabled) {
GetCloudPrintProxy()->EnableForUser(lsid);
}
+ // Enable Virtual Printer Driver if needed.
+ bool virtual_printer_driver_enabled = false;
+ service_prefs_->GetBoolean(prefs::kVirtualPrinterDriverEnabled,
+ &virtual_printer_driver_enabled);
+
+ if (virtual_printer_driver_enabled) {
+ // Register the fact that there is at least one
+ // service needing the process.
+ OnServiceEnabled();
+ }
VLOG(1) << "Starting Service Process IPC Server";
ipc_server_.reset(new ServiceIPCServer(
@@ -272,6 +282,20 @@ void ServiceProcess::OnCloudPrintProxyDisabled(bool persist_state) {
OnServiceDisabled();
}
+void ServiceProcess::EnableVirtualPrintDriver() {
+ OnServiceEnabled();
+ // Save the preference that we have enabled the virtual driver.
+ service_prefs_->SetBoolean(prefs::kVirtualPrinterDriverEnabled, true);
+ service_prefs_->WritePrefs();
+}
+
+void ServiceProcess::DisableVirtualPrintDriver() {
+ OnServiceDisabled();
+ // Save the preference that we have disabled the virtual driver.
+ service_prefs_->SetBoolean(prefs::kVirtualPrinterDriverEnabled, false);
+ service_prefs_->WritePrefs();
+}
+
ServiceURLRequestContextGetter*
ServiceProcess::GetServiceURLRequestContextGetter() {
DCHECK(request_context_getter_.get());
« no previous file with comments | « chrome/service/service_process.h ('k') | cloud_print/virtual_driver/posix/backend.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698