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

Unified Diff: chrome/browser/memory_details.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 | « chrome/browser/browser.cc ('k') | chrome/browser/plugin_process_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/memory_details.cc
===================================================================
--- chrome/browser/memory_details.cc (revision 9735)
+++ chrome/browser/memory_details.cc (working copy)
@@ -14,12 +14,11 @@
#include "base/thread.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chrome_thread.h"
-#include "chrome/browser/plugin_process_host.h"
-#include "chrome/browser/plugin_service.h"
#include "chrome/browser/renderer_host/render_process_host.h"
#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/browser/tab_contents/web_contents.h"
+#include "chrome/common/child_process_info.h"
class RenderViewHostDelegate;
@@ -38,7 +37,7 @@
//
// This operation will hit no fewer than 3 threads.
//
-// The PluginHostIterator can only be accessed from the IO thread.
+// The ChildProcessInfo::Iterator can only be accessed from the IO thread.
//
// The RenderProcessHostIterator can only be accessed from the UI thread.
//
@@ -73,21 +72,18 @@
std::vector<ProcessMemoryInformation> child_info;
- // Collect the list of plugins.
- for (PluginProcessHostIterator plugin_iter;
- !plugin_iter.Done(); ++plugin_iter) {
- ChildProcessInfo* child = const_cast<PluginProcessHost*>(*plugin_iter);
- DCHECK(child);
- if (!child || !child->process().handle())
+ // Collect the list of child processes.
+ for (ChildProcessInfo::Iterator iter; !iter.Done(); ++iter) {
+ if (!iter->process().handle())
continue;
ProcessMemoryInformation info;
- info.pid = child->process().pid();
+ info.pid = iter->process().pid();
if (!info.pid)
continue;
- info.type = child->type();
- info.titles.push_back(child->name());
+ info.type = iter->type();
+ info.titles.push_back(iter->name());
child_info.push_back(info);
}
@@ -244,7 +240,7 @@
ChildProcessInfo::UNKNOWN_PROCESS) {
process_data_[CHROME_BROWSER].processes.erase(
process_data_[CHROME_BROWSER].processes.begin() + index);
- index --;
+ index--;
}
}
« no previous file with comments | « chrome/browser/browser.cc ('k') | chrome/browser/plugin_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698