| Index: chrome/browser/task_manager_resource_providers.h
|
| diff --git a/chrome/browser/task_manager_resource_providers.h b/chrome/browser/task_manager_resource_providers.h
|
| index b96083ce2f2b4fa3408ad226fe059ea3ff34d811..2029a54fc000a4d9c8367deae5602a6de41106f3 100644
|
| --- a/chrome/browser/task_manager_resource_providers.h
|
| +++ b/chrome/browser/task_manager_resource_providers.h
|
| @@ -35,7 +35,7 @@ class TaskManagerTabContentsResource : public TaskManager::Resource {
|
| base::ProcessHandle GetProcess() const;
|
| TabContents* GetTabContents() const;
|
|
|
| - virtual bool ReportsCacheStats() const { return true; }
|
| + virtual bool HasCacheStats() const { return had_stats_update_; }
|
| virtual WebKit::WebCache::ResourceTypeStats GetWebCoreCacheStats() const;
|
|
|
| virtual bool ReportsV8MemoryStats() const { return true; }
|
| @@ -58,12 +58,18 @@ class TaskManagerTabContentsResource : public TaskManager::Resource {
|
| TabContents* tab_contents_;
|
| base::ProcessHandle process_;
|
| int pid_;
|
| +
|
| // The stats_ field holds information about resource usage in the renderer
|
| // process and so it is updated asynchronously by the Refresh() call.
|
| WebKit::WebCache::ResourceTypeStats stats_;
|
| +
|
| // This flag is true if we are waiting for the renderer to report its stats.
|
| bool pending_stats_update_;
|
|
|
| + // This flag is true after we received at least one stats report
|
| + // from the renderer.
|
| + bool had_stats_update_;
|
| +
|
| // We do a similar dance to gather the V8 memory usage in a process.
|
| size_t v8_memory_allocated_;
|
| size_t v8_memory_used_;
|
|
|