OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "cloud_print/service/win/cloud_print_service.h" | 5 #include "cloud_print/service/win/cloud_print_service.h" |
6 | 6 |
7 #include <atlsecurity.h> | 7 #include <atlsecurity.h> |
8 #include <iomanip> | 8 #include <iomanip> |
9 #include <iostream> | 9 #include <iostream> |
10 | 10 |
11 #include "base/at_exit.h" | 11 #include "base/at_exit.h" |
12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
13 #include "base/file_path.h" | 13 #include "base/file_path.h" |
14 #include "base/file_util.h" | 14 #include "base/file_util.h" |
15 #include "base/path_service.h" | 15 #include "base/path_service.h" |
16 #include "base/string_util.h" | 16 #include "base/string_util.h" |
17 #include "base/win/scoped_handle.h" | 17 #include "base/win/scoped_handle.h" |
18 #include "cloud_print/service/service_state.h" | |
19 #include "cloud_print/service/service_switches.h" | |
20 #include "cloud_print/service/win/chrome_launcher.h" | 18 #include "cloud_print/service/win/chrome_launcher.h" |
21 #include "cloud_print/service/win/resource.h" | 19 #include "cloud_print/service/win/resource.h" |
| 20 #include "cloud_print/service/win/service_state.h" |
| 21 #include "cloud_print/service/win/service_switches.h" |
22 | 22 |
23 namespace { | 23 namespace { |
24 | 24 |
25 const wchar_t kServiceStateFileName[] = L"Service State"; | 25 const wchar_t kServiceStateFileName[] = L"Service State"; |
26 | 26 |
27 const wchar_t kUserToRunService[] = L"NT AUTHORITY\\LocalService"; | 27 const wchar_t kUserToRunService[] = L"NT AUTHORITY\\LocalService"; |
28 | 28 |
29 // The traits class for Windows Service. | 29 // The traits class for Windows Service. |
30 class ServiceHandleTraits { | 30 class ServiceHandleTraits { |
31 public: | 31 public: |
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
456 | 456 |
457 BOOL CloudPrintServiceModule::ConsoleCtrlHandler(DWORD type) { | 457 BOOL CloudPrintServiceModule::ConsoleCtrlHandler(DWORD type) { |
458 PostThreadMessage(_AtlModule.m_dwThreadID, WM_QUIT, 0, 0); | 458 PostThreadMessage(_AtlModule.m_dwThreadID, WM_QUIT, 0, 0); |
459 return TRUE; | 459 return TRUE; |
460 } | 460 } |
461 | 461 |
462 int main() { | 462 int main() { |
463 base::AtExitManager at_exit; | 463 base::AtExitManager at_exit; |
464 return _AtlModule.WinMain(0); | 464 return _AtlModule.WinMain(0); |
465 } | 465 } |
OLD | NEW |