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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "base/message_loop.h"
6 #include "chrome/common/chrome_constants.h"
7 #include "chrome/common/chrome_switches.h"
8 #include "chrome/common/main_function_params.h"
9 #include "chrome/service/cloud_print/cloud_print_proxy.h"
10 #include "chrome/service/service_process.h"
11
12 // Mainline routine for running as the service process.
13 int ServiceProcessMain(const MainFunctionParams& parameters) {
14 MessageLoopForUI main_message_loop;
15 std::wstring app_name = chrome::kBrowserAppName;
16 PlatformThread::SetName(WideToASCII(app_name + L"_ServiceMain").c_str());
17
18 ServiceProcess service_process;
19 service_process.Initialize();
20 if (parameters.command_line_.HasSwitch(switches::kEnableCloudPrintProxy)) {
21 std::string lsid =
22 parameters.command_line_.GetSwitchValueASCII(
23 switches::kServiceAccountLsid);
24 std::string proxy_id =
25 parameters.command_line_.GetSwitchValueASCII(
26 switches::kCloudPrintProxyId);
27 service_process.cloud_print_proxy()->EnableForUser(lsid, proxy_id);
28 }
29 MessageLoop::current()->Run();
30 service_process.Teardown();
31
32 return 0;
33 }
34
OLDNEW
« 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