OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef CLOUD_PRINT_SERVICE_SERVICE_CONTROLLER_H_ | 5 #ifndef CLOUD_PRINT_SERVICE_SERVICE_CONTROLLER_H_ |
6 #define CLOUD_PRINT_SERVICE_SERVICE_CONTROLLER_H_ | 6 #define CLOUD_PRINT_SERVICE_SERVICE_CONTROLLER_H_ |
7 | 7 |
8 #include <atlbase.h> | 8 #include <atlbase.h> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 14 matching lines...) Expand all Loading... |
25 STATE_RUNNING, | 25 STATE_RUNNING, |
26 }; | 26 }; |
27 | 27 |
28 DECLARE_REGISTRY_APPID_RESOURCEID(IDR_CLOUDPRINTSERVICE, | 28 DECLARE_REGISTRY_APPID_RESOURCEID(IDR_CLOUDPRINTSERVICE, |
29 "{8013FB7C-2E3E-4992-B8BD-05C0C4AB0627}") | 29 "{8013FB7C-2E3E-4992-B8BD-05C0C4AB0627}") |
30 | 30 |
31 ServiceController(); | 31 ServiceController(); |
32 ~ServiceController(); | 32 ~ServiceController(); |
33 | 33 |
34 // Installs temporarily service to check pre-requirements. | 34 // Installs temporarily service to check pre-requirements. |
35 HRESULT InstallCheckService(const string16& user, | 35 HRESULT InstallCheckService(const base::string16& user, |
36 const string16& password, | 36 const base::string16& password, |
37 const base::FilePath& user_data_dir); | 37 const base::FilePath& user_data_dir); |
38 | 38 |
39 // Installs real service that will run connector. | 39 // Installs real service that will run connector. |
40 HRESULT InstallConnectorService(const string16& user, | 40 HRESULT InstallConnectorService(const base::string16& user, |
41 const string16& password, | 41 const base::string16& password, |
42 const base::FilePath& user_data_dir, | 42 const base::FilePath& user_data_dir, |
43 bool enable_logging); | 43 bool enable_logging); |
44 | 44 |
45 HRESULT UninstallService(); | 45 HRESULT UninstallService(); |
46 | 46 |
47 HRESULT StartService(); | 47 HRESULT StartService(); |
48 HRESULT StopService(); | 48 HRESULT StopService(); |
49 | 49 |
50 HRESULT UpdateBinaryPath(); | 50 HRESULT UpdateBinaryPath(); |
51 | 51 |
52 // Query service status and options. Results accessible with getters below. | 52 // Query service status and options. Results accessible with getters below. |
53 void UpdateState(); | 53 void UpdateState(); |
54 State state() const { return state_; } | 54 State state() const { return state_; } |
55 const string16& user() const { return user_; } | 55 const base::string16& user() const { return user_; } |
56 bool is_logging_enabled() const; | 56 bool is_logging_enabled() const; |
57 | 57 |
58 base::FilePath GetBinary() const; | 58 base::FilePath GetBinary() const; |
59 | 59 |
60 private: | 60 private: |
61 HRESULT InstallService(const string16& user, | 61 HRESULT InstallService(const base::string16& user, |
62 const string16& password, | 62 const base::string16& password, |
63 bool auto_start, | 63 bool auto_start, |
64 const std::string& run_switch, | 64 const std::string& run_switch, |
65 const base::FilePath& user_data_dir, | 65 const base::FilePath& user_data_dir, |
66 bool enable_logging); | 66 bool enable_logging); |
67 | 67 |
68 const string16 name_; | 68 const base::string16 name_; |
69 State state_; | 69 State state_; |
70 string16 user_; | 70 base::string16 user_; |
71 bool is_logging_enabled_; | 71 bool is_logging_enabled_; |
72 CommandLine command_line_; | 72 CommandLine command_line_; |
73 }; | 73 }; |
74 | 74 |
75 #endif // CLOUD_PRINT_SERVICE_SERVICE_CONTROLLER_H_ | 75 #endif // CLOUD_PRINT_SERVICE_SERVICE_CONTROLLER_H_ |
76 | 76 |
OLD | NEW |