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

Unified Diff: content/browser/browser_child_process_host.h

Issue 8770027: Get rid of the ChildProcessInfo class. It was carrying unnecessary data, and the fact that some p... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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 | « chrome/browser/ui/webui/workers_ui.cc ('k') | content/browser/browser_child_process_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/browser_child_process_host.h
===================================================================
--- content/browser/browser_child_process_host.h (revision 112500)
+++ content/browser/browser_child_process_host.h (working copy)
@@ -9,12 +9,12 @@
#include <list>
#include "base/memory/weak_ptr.h"
+#include "base/process.h"
#include "base/synchronization/waitable_event_watcher.h"
#include "content/browser/child_process_launcher.h"
#include "content/common/child_process_host.h"
-#include "content/common/child_process_info.h"
#include "content/common/content_export.h"
-#include "content/public/common/process_type.h"
+#include "content/public/browser/child_process_data.h"
namespace base {
class WaitableEvent;
@@ -27,7 +27,6 @@
// this class. That project lives on the UI thread.
class CONTENT_EXPORT BrowserChildProcessHost :
public ChildProcessHost,
- public ChildProcessInfo,
public ChildProcessLauncher::Client,
public base::WaitableEventWatcher::Delegate {
public:
@@ -59,6 +58,12 @@
std::list<BrowserChildProcessHost*>::iterator iterator_;
};
+ const content::ChildProcessData& data() const { return data_; }
+ content::ProcessType type() const { return data_.type; }
+ const string16& name() const { return data_.name; }
+ base::ProcessHandle handle() const { return data_.handle; }
+ int id() const { return data_.id; }
+
protected:
explicit BrowserChildProcessHost(content::ProcessType type);
@@ -112,6 +117,9 @@
// Sends the given notification on the UI thread.
void Notify(int type);
+ void set_name(const string16& name) { data_.name = name; }
+ void set_handle(base::ProcessHandle handle) { data_.handle = handle; }
+
private:
// By using an internal class as the ChildProcessLauncher::Client, we can
// intercept OnProcessLaunched and do our own processing before
@@ -124,6 +132,8 @@
BrowserChildProcessHost* host_;
};
+ content::ChildProcessData data_;
+
ClientHook client_;
scoped_ptr<ChildProcessLauncher> child_process_;
#if defined(OS_WIN)
« no previous file with comments | « chrome/browser/ui/webui/workers_ui.cc ('k') | content/browser/browser_child_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698