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

Unified Diff: chrome/browser/task_manager_resource_providers.cc

Issue 2856091: Fix some problems with TaskManagerBrowserTest.PopulateWebCacheFields: (Closed)
Patch Set: memset Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/task_manager_resource_providers.h ('k') | chrome/common/notification_type.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/task_manager_resource_providers.cc
diff --git a/chrome/browser/task_manager_resource_providers.cc b/chrome/browser/task_manager_resource_providers.cc
index d3fa808d99f889634191e20481f6f95cd04087ca..65b107afc5d7da392f5a44e64b77087c9c6c7630 100644
--- a/chrome/browser/task_manager_resource_providers.cc
+++ b/chrome/browser/task_manager_resource_providers.cc
@@ -54,6 +54,7 @@ TaskManagerTabContentsResource::TaskManagerTabContentsResource(
TabContents* tab_contents)
: tab_contents_(tab_contents),
pending_stats_update_(false),
+ had_stats_update_(false),
v8_memory_allocated_(0),
v8_memory_used_(0),
pending_v8_memory_allocated_update_(false) {
@@ -61,11 +62,7 @@ TaskManagerTabContentsResource::TaskManagerTabContentsResource(
// becomes NULL and the TaskManager still needs it.
process_ = tab_contents_->GetRenderProcessHost()->GetHandle();
pid_ = base::GetProcId(process_);
- stats_.images.size = 0;
- stats_.cssStyleSheets.size = 0;
- stats_.scripts.size = 0;
- stats_.xslStyleSheets.size = 0;
- stats_.fonts.size = 0;
+ memset(&stats_, 0, sizeof(stats_));
}
TaskManagerTabContentsResource::~TaskManagerTabContentsResource() {
@@ -122,6 +119,7 @@ void TaskManagerTabContentsResource::NotifyResourceTypeStats(
const WebKit::WebCache::ResourceTypeStats& stats) {
stats_ = stats;
pending_stats_update_ = false;
+ had_stats_update_ = true;
}
void TaskManagerTabContentsResource::NotifyV8HeapStats(
« no previous file with comments | « chrome/browser/task_manager_resource_providers.h ('k') | chrome/common/notification_type.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698