Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(166)

Unified Diff: chromeos/process_proxy/process_proxy_registry.h

Issue 1258193002: User MessageLoopForIO::WatchFileDescriptor in proces_output_watcher (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chromeos/process_proxy/process_proxy.cc ('k') | chromeos/process_proxy/process_proxy_registry.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/process_proxy/process_proxy_registry.h
diff --git a/chromeos/process_proxy/process_proxy_registry.h b/chromeos/process_proxy/process_proxy_registry.h
index 4280ebd2d2d39c22e3787f79fc9035713f6185ef..554af9e2cf7f552970f15494defca3cb2e7be0ff 100644
--- a/chromeos/process_proxy/process_proxy_registry.h
+++ b/chromeos/process_proxy/process_proxy_registry.h
@@ -6,6 +6,7 @@
#define CHROMEOS_PROCESS_PROXY_PROCESS_PROXY_REGISTRY_H_
#include <map>
+#include <string>
#include "base/callback.h"
#include "base/lazy_instance.h"
@@ -28,7 +29,6 @@ class CHROMEOS_EXPORT ProcessProxyRegistry : public base::NonThreadSafe {
// Info we need about a ProcessProxy instance.
struct ProcessProxyInfo {
scoped_refptr<ProcessProxy> proxy;
- scoped_ptr<base::Thread> watcher_thread;
ProcessOutputCallbackWithPid callback;
pid_t process_id;
@@ -50,6 +50,9 @@ class CHROMEOS_EXPORT ProcessProxyRegistry : public base::NonThreadSafe {
// Reports terminal resize to process proxy.
bool OnTerminalResize(pid_t pid, int width, int height);
+ // Shuts down registry, closing all associated processed.
+ void ShutDown();
+
// Currently used for testing.
void SetOutputCallback(const ProcessOutputCallback& callback);
@@ -64,9 +67,13 @@ class CHROMEOS_EXPORT ProcessProxyRegistry : public base::NonThreadSafe {
ProcessOutputType type,
const std::string& data);
+ bool EnsureWatcherThreadStarted();
+
// Map of all existing ProcessProxies.
std::map<pid_t, ProcessProxyInfo> proxy_map_;
+ scoped_ptr<base::Thread> watcher_thread_;
+
DISALLOW_COPY_AND_ASSIGN(ProcessProxyRegistry);
};
« no previous file with comments | « chromeos/process_proxy/process_proxy.cc ('k') | chromeos/process_proxy/process_proxy_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698