OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 CHROMEOS_PLATFORM_UPDATE_ENGINE_SUBPROCESS_H__ | 5 #ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_SUBPROCESS_H__ |
6 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_SUBPROCESS_H__ | 6 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_SUBPROCESS_H__ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 #include <glib.h> | 11 #include <glib.h> |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "chromeos/obsolete_logging.h" | 13 #include "base/logging.h" |
14 | 14 |
15 // The Subprocess class is a singleton. It's used to spawn off a subprocess | 15 // The Subprocess class is a singleton. It's used to spawn off a subprocess |
16 // and get notified when the subprocess exits. The result of Exec() can | 16 // and get notified when the subprocess exits. The result of Exec() can |
17 // be saved and used to cancel the callback request. If you know you won't | 17 // be saved and used to cancel the callback request. If you know you won't |
18 // call CancelExec(), you may safely lose the return value from Exec(). | 18 // call CancelExec(), you may safely lose the return value from Exec(). |
19 | 19 |
20 namespace chromeos_update_engine { | 20 namespace chromeos_update_engine { |
21 | 21 |
22 class Subprocess { | 22 class Subprocess { |
23 public: | 23 public: |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 | 70 |
71 std::map<int, SubprocessCallbackRecord> callback_records_; | 71 std::map<int, SubprocessCallbackRecord> callback_records_; |
72 | 72 |
73 Subprocess() {} | 73 Subprocess() {} |
74 DISALLOW_COPY_AND_ASSIGN(Subprocess); | 74 DISALLOW_COPY_AND_ASSIGN(Subprocess); |
75 }; | 75 }; |
76 | 76 |
77 } // namespace chromeos_update_engine | 77 } // namespace chromeos_update_engine |
78 | 78 |
79 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_SUBPROCESS_H__ | 79 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_SUBPROCESS_H__ |
OLD | NEW |