summaryrefslogtreecommitdiffstats
path: root/chrome/browser/dom_ui
diff options
context:
space:
mode:
authoreroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-18 06:38:33 +0000
committereroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-18 06:38:33 +0000
commite607d3266a26620aba062230d89a08b2c2705d1c (patch)
treecaa5923f50cc7a6dc14899983f905551b38c9c42 /chrome/browser/dom_ui
parent7e3c055692e71ed5ff2afdefb400eeb92e3e70db (diff)
downloadchromium_src-e607d3266a26620aba062230d89a08b2c2705d1c.zip
chromium_src-e607d3266a26620aba062230d89a08b2c2705d1c.tar.gz
chromium_src-e607d3266a26620aba062230d89a08b2c2705d1c.tar.bz2
Removed the "Reload" button from the HTTP cache tab of the net-internals page.
The "Reload" button was used to refresh the stats + cache listings. With this change, I poll the statistics for updates, so the reload button is unecessary. Note that the cache listing is too expensive to poll, so I replaced it with a link to a listings page. Lastly, updated the text dump to include the http cache statistics. BUG=37421 Review URL: http://codereview.chromium.org/2085005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47499 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/dom_ui')
-rw-r--r--chrome/browser/dom_ui/net_internals_ui.cc12
1 files changed, 1 insertions, 11 deletions
diff --git a/chrome/browser/dom_ui/net_internals_ui.cc b/chrome/browser/dom_ui/net_internals_ui.cc
index 9b55d0e..8d65488 100644
--- a/chrome/browser/dom_ui/net_internals_ui.cc
+++ b/chrome/browser/dom_ui/net_internals_ui.cc
@@ -557,6 +557,7 @@ void NetInternalsMessageHandler::IOThreadImpl::OnRendererReady(
OnGetProxySettings(NULL);
OnGetBadProxies(NULL);
OnGetHostResolverCache(NULL);
+ OnGetHttpCacheInfo(NULL);
}
void NetInternalsMessageHandler::IOThreadImpl::OnGetProxySettings(
@@ -732,22 +733,12 @@ void NetInternalsMessageHandler::IOThreadImpl::OnStartConnectionTests(
void NetInternalsMessageHandler::IOThreadImpl::OnGetHttpCacheInfo(
const Value* value) {
DictionaryValue* info_dict = new DictionaryValue();
- ListValue* entry_keys = new ListValue();
DictionaryValue* stats_dict = new DictionaryValue();
disk_cache::Backend* disk_cache = GetDiskCacheBackend(
context_getter_->GetURLRequestContext());
if (disk_cache) {
- // Iterate over all the entries in the cache, to discover the keys.
- // WARNING: this can be slow! (and will block the IO thread).
- void* iter = NULL;
- disk_cache::Entry* entry;
- while (disk_cache->OpenNextEntry(&iter, &entry)) {
- entry_keys->Append(Value::CreateStringValue(entry->GetKey()));
- entry->Close();
- }
-
// Extract the statistics key/value pairs from the backend.
std::vector<std::pair<std::string, std::string> > stats;
disk_cache->GetStats(&stats);
@@ -757,7 +748,6 @@ void NetInternalsMessageHandler::IOThreadImpl::OnGetHttpCacheInfo(
}
}
- info_dict->Set(L"keys", entry_keys);
info_dict->Set(L"stats", stats_dict);
CallJavascriptFunction(L"g_browser.receivedHttpCacheInfo", info_dict);