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

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

Issue 10836313: Correctly determine extension process type on chrome://memory page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 | « no previous file | no next file » | 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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 break; 267 break;
268 } 268 }
269 } 269 }
270 } 270 }
271 if (extension_process_map->Contains(host->GetProcess()->GetID())) { 271 if (extension_process_map->Contains(host->GetProcess()->GetID())) {
272 const Extension* extension = 272 const Extension* extension =
273 extension_service->extensions()->GetByID(url.host()); 273 extension_service->extensions()->GetByID(url.host());
274 if (extension) { 274 if (extension) {
275 string16 title = UTF8ToUTF16(extension->name()); 275 string16 title = UTF8ToUTF16(extension->name());
276 process.titles.push_back(title); 276 process.titles.push_back(title);
277 process.renderer_type =
278 ProcessMemoryInformation::RENDERER_EXTENSION;
279 continue;
277 } 280 }
278 continue;
279 } 281 }
280 282
281 if (!contents) { 283 if (!contents) {
282 process.renderer_type = 284 process.renderer_type =
283 ProcessMemoryInformation::RENDERER_INTERSTITIAL; 285 ProcessMemoryInformation::RENDERER_INTERSTITIAL;
284 continue; 286 continue;
285 } 287 }
286 288
287 if (type == chrome::VIEW_TYPE_BACKGROUND_CONTENTS) { 289 if (type == chrome::VIEW_TYPE_BACKGROUND_CONTENTS) {
288 process.titles.push_back(UTF8ToUTF16(url.spec())); 290 process.titles.push_back(UTF8ToUTF16(url.spec()));
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 UMA_HISTOGRAM_COUNTS_100("Memory.PepperPluginProcessCount", 458 UMA_HISTOGRAM_COUNTS_100("Memory.PepperPluginProcessCount",
457 pepper_plugin_count); 459 pepper_plugin_count);
458 UMA_HISTOGRAM_COUNTS_100("Memory.RendererProcessCount", renderer_count); 460 UMA_HISTOGRAM_COUNTS_100("Memory.RendererProcessCount", renderer_count);
459 UMA_HISTOGRAM_COUNTS_100("Memory.WorkerProcessCount", worker_count); 461 UMA_HISTOGRAM_COUNTS_100("Memory.WorkerProcessCount", worker_count);
460 // TODO(viettrungluu): Do we want separate counts for the other 462 // TODO(viettrungluu): Do we want separate counts for the other
461 // (platform-specific) process types? 463 // (platform-specific) process types?
462 464
463 int total_sample = static_cast<int>(aggregate_memory / 1000); 465 int total_sample = static_cast<int>(aggregate_memory / 1000);
464 UMA_HISTOGRAM_MEMORY_MB("Memory.Total", total_sample); 466 UMA_HISTOGRAM_MEMORY_MB("Memory.Total", total_sample);
465 } 467 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698