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

Unified Diff: chrome/browser/task_manager.cc

Issue 3118003: Revert 55449 - Fix some problems with TaskManagerBrowserTest.PopulateWebCache... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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.h ('k') | chrome/browser/task_manager_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/task_manager.cc
===================================================================
--- chrome/browser/task_manager.cc (revision 55529)
+++ chrome/browser/task_manager.cc (working copy)
@@ -24,7 +24,6 @@
#include "chrome/browser/renderer_host/resource_dispatcher_host.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/browser/task_manager_resource_providers.h"
-#include "chrome/common/notification_service.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
#include "grit/app_resources.h"
@@ -180,7 +179,7 @@
std::wstring TaskManagerModel::GetResourceWebCoreImageCacheSize(
int index) const {
DCHECK(index < ResourceCount());
- if (!resources_[index]->HasCacheStats())
+ if (!resources_[index]->ReportsCacheStats())
return l10n_util::GetString(IDS_TASK_MANAGER_NA_CELL_TEXT);
const WebKit::WebCache::ResourceTypeStats stats(
resources_[index]->GetWebCoreCacheStats());
@@ -190,7 +189,7 @@
std::wstring TaskManagerModel::GetResourceWebCoreScriptsCacheSize(
int index) const {
DCHECK(index < ResourceCount());
- if (!resources_[index]->HasCacheStats())
+ if (!resources_[index]->ReportsCacheStats())
return l10n_util::GetString(IDS_TASK_MANAGER_NA_CELL_TEXT);
const WebKit::WebCache::ResourceTypeStats stats(
resources_[index]->GetWebCoreCacheStats());
@@ -200,7 +199,7 @@
std::wstring TaskManagerModel::GetResourceWebCoreCSSCacheSize(
int index) const {
DCHECK(index < ResourceCount());
- if (!resources_[index]->HasCacheStats())
+ if (!resources_[index]->ReportsCacheStats())
return l10n_util::GetString(IDS_TASK_MANAGER_NA_CELL_TEXT);
const WebKit::WebCache::ResourceTypeStats stats(
resources_[index]->GetWebCoreCacheStats());
@@ -339,9 +338,9 @@
case IDS_TASK_MANAGER_WEBCORE_CSS_CACHE_COLUMN: {
WebKit::WebCache::ResourceTypeStats stats1 = { { 0 } };
WebKit::WebCache::ResourceTypeStats stats2 = { { 0 } };
- if (resources_[row1]->HasCacheStats())
+ if (resources_[row1]->ReportsCacheStats())
stats1 = resources_[row1]->GetWebCoreCacheStats();
- if (resources_[row2]->HasCacheStats())
+ if (resources_[row2]->ReportsCacheStats())
stats2 = resources_[row2]->GetWebCoreCacheStats();
if (IDS_TASK_MANAGER_WEBCORE_IMAGE_CACHE_COLUMN == col_id)
return ValueCompare<size_t>(stats1.images.size, stats2.images.size);
@@ -688,10 +687,6 @@
(*it)->NotifyResourceTypeStats(stats);
}
}
- NotificationService::current()->Notify(
- NotificationType::TASK_MANAGER_RESOURCE_TYPE_STATS_UPDATED,
- Source<TaskManagerModel>(this),
- NotificationService::NoDetails());
}
void TaskManagerModel::NotifyV8HeapStats(base::ProcessId renderer_id,
« no previous file with comments | « chrome/browser/task_manager.h ('k') | chrome/browser/task_manager_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698