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

Side by Side Diff: chrome/browser/memory_details.cc

Issue 10107002: TabContents -> WebContentsImpl, part 18. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/instant/instant_unload_handler.cc ('k') | chrome/browser/oom_priority_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/memory_details.h" 5 #include "chrome/browser/memory_details.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_version_info.h" 8 #include "base/file_version_info.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/process_util.h" 10 #include "base/process_util.h"
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 continue; 184 continue;
185 } 185 }
186 process.type = content::PROCESS_TYPE_RENDERER; 186 process.type = content::PROCESS_TYPE_RENDERER;
187 Profile* profile = 187 Profile* profile =
188 Profile::FromBrowserContext( 188 Profile::FromBrowserContext(
189 render_process_host->GetBrowserContext()); 189 render_process_host->GetBrowserContext());
190 ExtensionService* extension_service = profile->GetExtensionService(); 190 ExtensionService* extension_service = profile->GetExtensionService();
191 extensions::ProcessMap* extension_process_map = 191 extensions::ProcessMap* extension_process_map =
192 extension_service->process_map(); 192 extension_service->process_map();
193 193
194 // The RenderProcessHost may host multiple TabContents. Any 194 // The RenderProcessHost may host multiple WebContentses. Any
195 // of them which contain diagnostics information make the whole 195 // of them which contain diagnostics information make the whole
196 // process be considered a diagnostics process. 196 // process be considered a diagnostics process.
197 content::RenderProcessHost::RenderWidgetHostsIterator iter( 197 content::RenderProcessHost::RenderWidgetHostsIterator iter(
198 render_process_host->GetRenderWidgetHostsIterator()); 198 render_process_host->GetRenderWidgetHostsIterator());
199 for (; !iter.IsAtEnd(); iter.Advance()) { 199 for (; !iter.IsAtEnd(); iter.Advance()) {
200 const RenderWidgetHost* widget = iter.GetCurrentValue(); 200 const RenderWidgetHost* widget = iter.GetCurrentValue();
201 DCHECK(widget); 201 DCHECK(widget);
202 if (!widget || !widget->IsRenderView()) 202 if (!widget || !widget->IsRenderView())
203 continue; 203 continue;
204 204
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 UMA_HISTOGRAM_COUNTS_100("Memory.PepperPluginProcessCount", 424 UMA_HISTOGRAM_COUNTS_100("Memory.PepperPluginProcessCount",
425 pepper_plugin_count); 425 pepper_plugin_count);
426 UMA_HISTOGRAM_COUNTS_100("Memory.RendererProcessCount", renderer_count); 426 UMA_HISTOGRAM_COUNTS_100("Memory.RendererProcessCount", renderer_count);
427 UMA_HISTOGRAM_COUNTS_100("Memory.WorkerProcessCount", worker_count); 427 UMA_HISTOGRAM_COUNTS_100("Memory.WorkerProcessCount", worker_count);
428 // TODO(viettrungluu): Do we want separate counts for the other 428 // TODO(viettrungluu): Do we want separate counts for the other
429 // (platform-specific) process types? 429 // (platform-specific) process types?
430 430
431 int total_sample = static_cast<int>(aggregate_memory / 1000); 431 int total_sample = static_cast<int>(aggregate_memory / 1000);
432 UMA_HISTOGRAM_MEMORY_MB("Memory.Total", total_sample); 432 UMA_HISTOGRAM_MEMORY_MB("Memory.Total", total_sample);
433 } 433 }
OLDNEW
« no previous file with comments | « chrome/browser/instant/instant_unload_handler.cc ('k') | chrome/browser/oom_priority_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698