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

Unified Diff: chrome/browser/browser.cc

Issue 24017: More refactoring of PluginProcessHost (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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 | « no previous file | chrome/browser/memory_details.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser.cc
===================================================================
--- chrome/browser/browser.cc (revision 9735)
+++ chrome/browser/browser.cc (working copy)
@@ -23,6 +23,7 @@
#include "chrome/browser/tab_contents/site_instance.h"
#include "chrome/browser/tab_contents/tab_contents_type.h"
#include "chrome/browser/tab_contents/web_contents.h"
+#include "chrome/common/child_process_info.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/l10n_util.h"
@@ -59,8 +60,6 @@
#include "chrome/browser/history_tab_ui.h"
#include "chrome/browser/options_window.h"
#include "chrome/browser/net/url_fixer_upper.h"
-#include "chrome/browser/plugin_process_host.h"
-#include "chrome/browser/plugin_service.h"
#include "chrome/browser/ssl/ssl_error_info.h"
#include "chrome/browser/status_bubble.h"
#include "chrome/browser/tab_contents/interstitial_page.h"
@@ -92,15 +91,15 @@
///////////////////////////////////////////////////////////////////////////////
-// A task to reduce the working set of the plugins.
-class ReducePluginsWorkingSetTask : public Task {
+// A task to reduce the working set of the child processes that live on the IO
+// thread (i.e. plugins, workers).
+class ReduceChildProcessesWorkingSetTask : public Task {
public:
virtual void Run() {
#if defined(OS_WIN)
- for (PluginProcessHostIterator iter; !iter.Done(); ++iter) {
- ChildProcessInfo* child = const_cast<PluginProcessHost*>(*iter);
- DCHECK(child->process().handle());
- child->process().ReduceWorkingSet();
+ for (ChildProcessInfo::Iterator iter; !iter.Done(); ++iter) {
+ DCHECK(iter->process().handle());
+ iter->process().ReduceWorkingSet();
}
#endif
}
@@ -132,11 +131,10 @@
process.ReduceWorkingSet();
}
- // Handle the Plugin(s). We need to iterate through the plugin processes
- // on the IO thread because that thread manages the plugin process
- // collection.
+ // Handle the child processe. We need to iterate through them on the IO
+ // thread because that thread manages the child process collection.
g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE,
- new ReducePluginsWorkingSetTask());
+ new ReduceChildProcessesWorkingSetTask());
#endif
}
};
« no previous file with comments | « no previous file | chrome/browser/memory_details.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698