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

Unified Diff: chromeos/process_proxy/process_proxy_registry.h

Issue 12433023: Move chrome/browser/chromeos/process_proxy to chromeos (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 9 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/chrome/browser/chromeos/process_proxy/process_proxy_registry.h b/chromeos/process_proxy/process_proxy_registry.h
similarity index 71%
rename from chrome/browser/chromeos/process_proxy/process_proxy_registry.h
rename to chromeos/process_proxy/process_proxy_registry.h
index b6dcea58ca859e159a42275b678dc47333d79604..4280ebd2d2d39c22e3787f79fc9035713f6185ef 100644
--- a/chrome/browser/chromeos/process_proxy/process_proxy_registry.h
+++ b/chromeos/process_proxy/process_proxy_registry.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_CHROMEOS_PROCESS_PROXY_PROCESS_PROXY_REGISTRY_H_
-#define CHROME_BROWSER_CHROMEOS_PROCESS_PROXY_PROCESS_PROXY_REGISTRY_H_
+#ifndef CHROMEOS_PROCESS_PROXY_PROCESS_PROXY_REGISTRY_H_
+#define CHROMEOS_PROCESS_PROXY_PROCESS_PROXY_REGISTRY_H_
#include <map>
@@ -11,15 +11,19 @@
#include "base/lazy_instance.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/ref_counted.h"
+#include "base/threading/non_thread_safe.h"
#include "base/threading/thread.h"
-#include "chrome/browser/chromeos/process_proxy/process_proxy.h"
+#include "chromeos/chromeos_export.h"
+#include "chromeos/process_proxy/process_proxy.h"
+
+namespace chromeos {
typedef base::Callback<void(pid_t, const std::string&, const std::string&)>
ProcessOutputCallbackWithPid;
// Keeps track of all created ProcessProxies. It is created lazily and should
-// live on the FILE thread (where all methods must be called).
-class ProcessProxyRegistry {
+// live on a single thread (where all methods must be called).
+class CHROMEOS_EXPORT ProcessProxyRegistry : public base::NonThreadSafe {
public:
// Info we need about a ProcessProxy instance.
struct ProcessProxyInfo {
@@ -59,12 +63,6 @@ class ProcessProxyRegistry {
void OnProcessOutput(pid_t pid,
ProcessOutputType type,
const std::string& data);
- // Must be called on UI thread. This lives on FILE thread, thus static.
- // Notifies CroshProcessEventRouter about new process output. Assumes the
- // event router has already been initialized by someone else.
- static void DispatchProcessOutputOnUIThread(pid_t pid,
- const std::string& output_type,
- const std::string& output);
// Map of all existing ProcessProxies.
std::map<pid_t, ProcessProxyInfo> proxy_map_;
@@ -72,4 +70,6 @@ class ProcessProxyRegistry {
DISALLOW_COPY_AND_ASSIGN(ProcessProxyRegistry);
};
-#endif // CHROME_BROWSER_CHROMEOS_PROCESS_PROXY_PROCESS_PROXY_REGISTRY_H_
+} // namespace chromeos
+
+#endif // CHROMEOS_PROCESS_PROXY_PROCESS_PROXY_REGISTRY_H_
« 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