| OLD | NEW | 
|   1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |   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 |   2 // Use of this source code is governed by a BSD-style license that can be | 
|   3 // found in the LICENSE file. |   3 // found in the LICENSE file. | 
|   4  |   4  | 
|   5 #include "base/debug_util.h" |   5 #include "base/debug_util.h" | 
|   6 #include "base/message_loop.h" |   6 #include "base/message_loop.h" | 
|   7 #include "base/path_service.h" |   7 #include "base/path_service.h" | 
|   8 #include "chrome/common/chrome_paths.h" |   8 #include "chrome/common/chrome_paths.h" | 
|   9 #include "chrome/common/chrome_switches.h" |   9 #include "chrome/common/chrome_switches.h" | 
|  10 #include "chrome/common/main_function_params.h" |  10 #include "chrome/common/main_function_params.h" | 
| (...skipping 11 matching lines...) Expand all  Loading... | 
|  22   PlatformThread::SetName("CrServiceMain"); |  22   PlatformThread::SetName("CrServiceMain"); | 
|  23  |  23  | 
|  24 #if defined(OS_WIN) |  24 #if defined(OS_WIN) | 
|  25   sandbox::BrokerServices* broker_services = |  25   sandbox::BrokerServices* broker_services = | 
|  26       parameters.sandbox_info_.BrokerServices(); |  26       parameters.sandbox_info_.BrokerServices(); | 
|  27   if (broker_services) |  27   if (broker_services) | 
|  28     sandbox::InitBrokerServices(broker_services); |  28     sandbox::InitBrokerServices(broker_services); | 
|  29 #endif   // defined(OS_WIN) |  29 #endif   // defined(OS_WIN) | 
|  30  |  30  | 
|  31   ServiceProcess service_process; |  31   ServiceProcess service_process; | 
|  32   service_process.Initialize(&main_message_loop); |  32   service_process.Initialize(&main_message_loop, parameters.command_line_); | 
|  33  |  | 
|  34   // Enable Cloud Print if needed. |  | 
|  35   if (parameters.command_line_.HasSwitch(switches::kEnableCloudPrintProxy)) { |  | 
|  36     std::string lsid = |  | 
|  37         parameters.command_line_.GetSwitchValueASCII( |  | 
|  38             switches::kServiceAccountLsid); |  | 
|  39     service_process.GetCloudPrintProxy()->EnableForUser(lsid); |  | 
|  40   } |  | 
|  41  |  33  | 
|  42   MessageLoop::current()->Run(); |  34   MessageLoop::current()->Run(); | 
|  43   service_process.Teardown(); |  35   service_process.Teardown(); | 
|  44   return 0; |  36   return 0; | 
|  45 } |  37 } | 
| OLD | NEW |