| 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 #ifndef CHROME_SERVICE_SERVICE_PROCESS_H_ | 5 #ifndef CHROME_SERVICE_SERVICE_PROCESS_H_ |
| 6 #define CHROME_SERVICE_SERVICE_PROCESS_H_ | 6 #define CHROME_SERVICE_SERVICE_PROCESS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/threading/sequenced_worker_pool.h" |
| 13 #include "base/threading/thread.h" | 14 #include "base/threading/thread.h" |
| 14 #include "base/synchronization/waitable_event.h" | 15 #include "base/synchronization/waitable_event.h" |
| 15 #include "chrome/service/cloud_print/cloud_print_proxy.h" | 16 #include "chrome/service/cloud_print/cloud_print_proxy.h" |
| 16 | 17 |
| 17 class ServiceProcessPrefs; | 18 class ServiceProcessPrefs; |
| 18 class ServiceIPCServer; | 19 class ServiceIPCServer; |
| 19 class CommandLine; | 20 class CommandLine; |
| 20 class ServiceURLRequestContextGetter; | 21 class ServiceURLRequestContextGetter; |
| 21 class ServiceProcessState; | 22 class ServiceProcessState; |
| 22 | 23 |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 // Called exactly ONCE per process instance for each service that gets | 117 // Called exactly ONCE per process instance for each service that gets |
| 117 // disabled in this process (note that shutdown != disabled). | 118 // disabled in this process (note that shutdown != disabled). |
| 118 void OnServiceDisabled(); | 119 void OnServiceDisabled(); |
| 119 | 120 |
| 120 // Terminate forces the service process to quit. | 121 // Terminate forces the service process to quit. |
| 121 void Terminate(); | 122 void Terminate(); |
| 122 | 123 |
| 123 scoped_ptr<net::NetworkChangeNotifier> network_change_notifier_; | 124 scoped_ptr<net::NetworkChangeNotifier> network_change_notifier_; |
| 124 scoped_ptr<base::Thread> io_thread_; | 125 scoped_ptr<base::Thread> io_thread_; |
| 125 scoped_ptr<base::Thread> file_thread_; | 126 scoped_ptr<base::Thread> file_thread_; |
| 127 scoped_refptr<base::SequencedWorkerPool> blocking_pool_; |
| 126 scoped_ptr<CloudPrintProxy> cloud_print_proxy_; | 128 scoped_ptr<CloudPrintProxy> cloud_print_proxy_; |
| 127 scoped_ptr<ServiceProcessPrefs> service_prefs_; | 129 scoped_ptr<ServiceProcessPrefs> service_prefs_; |
| 128 scoped_ptr<ServiceIPCServer> ipc_server_; | 130 scoped_ptr<ServiceIPCServer> ipc_server_; |
| 129 scoped_ptr<ServiceProcessState> service_process_state_; | 131 scoped_ptr<ServiceProcessState> service_process_state_; |
| 130 | 132 |
| 131 // An event that will be signalled when we shutdown. | 133 // An event that will be signalled when we shutdown. |
| 132 base::WaitableEvent shutdown_event_; | 134 base::WaitableEvent shutdown_event_; |
| 133 | 135 |
| 134 // Pointer to the main message loop that host this object. | 136 // Pointer to the main message loop that host this object. |
| 135 MessageLoop* main_message_loop_; | 137 MessageLoop* main_message_loop_; |
| 136 | 138 |
| 137 // Count of currently enabled services in this process. | 139 // Count of currently enabled services in this process. |
| 138 int enabled_services_; | 140 int enabled_services_; |
| 139 | 141 |
| 140 // Speficies whether a product update is available. | 142 // Speficies whether a product update is available. |
| 141 bool update_available_; | 143 bool update_available_; |
| 142 | 144 |
| 143 scoped_refptr<ServiceURLRequestContextGetter> request_context_getter_; | 145 scoped_refptr<ServiceURLRequestContextGetter> request_context_getter_; |
| 144 | 146 |
| 145 DISALLOW_COPY_AND_ASSIGN(ServiceProcess); | 147 DISALLOW_COPY_AND_ASSIGN(ServiceProcess); |
| 146 }; | 148 }; |
| 147 | 149 |
| 148 extern ServiceProcess* g_service_process; | 150 extern ServiceProcess* g_service_process; |
| 149 | 151 |
| 150 #endif // CHROME_SERVICE_SERVICE_PROCESS_H_ | 152 #endif // CHROME_SERVICE_SERVICE_PROCESS_H_ |
| OLD | NEW |