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

Unified Diff: chrome/service/service_main.cc

Issue 2001009: Created a new process type called the service process to host background task... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 7 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/net/service_url_request_context.cc ('k') | chrome/service/service_process.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/service/service_main.cc
===================================================================
--- chrome/service/service_main.cc (revision 0)
+++ chrome/service/service_main.cc (revision 0)
@@ -0,0 +1,34 @@
+// Copyright (c) 2010 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 "base/message_loop.h"
+#include "chrome/common/chrome_constants.h"
+#include "chrome/common/chrome_switches.h"
+#include "chrome/common/main_function_params.h"
+#include "chrome/service/cloud_print/cloud_print_proxy.h"
+#include "chrome/service/service_process.h"
+
+// Mainline routine for running as the service process.
+int ServiceProcessMain(const MainFunctionParams& parameters) {
+ MessageLoopForUI main_message_loop;
+ std::wstring app_name = chrome::kBrowserAppName;
+ PlatformThread::SetName(WideToASCII(app_name + L"_ServiceMain").c_str());
+
+ ServiceProcess service_process;
+ service_process.Initialize();
+ if (parameters.command_line_.HasSwitch(switches::kEnableCloudPrintProxy)) {
+ std::string lsid =
+ parameters.command_line_.GetSwitchValueASCII(
+ switches::kServiceAccountLsid);
+ std::string proxy_id =
+ parameters.command_line_.GetSwitchValueASCII(
+ switches::kCloudPrintProxyId);
+ service_process.cloud_print_proxy()->EnableForUser(lsid, proxy_id);
+ }
+ MessageLoop::current()->Run();
+ service_process.Teardown();
+
+ return 0;
+}
+
Property changes on: chrome\service\service_main.cc
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « chrome/service/net/service_url_request_context.cc ('k') | chrome/service/service_process.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698