diff options
author | szym@chromium.org <szym@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-21 00:56:27 +0000 |
---|---|---|
committer | szym@chromium.org <szym@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-21 00:56:27 +0000 |
commit | a27308823dcdc002d05a355404dca725532e1697 (patch) | |
tree | 1c41eb271e7cc98c28cc3ee94d1825c7fcb98bc8 /chrome/browser/ui/webui | |
parent | b3dd6cf5edadb959e8cda836aa2d7078cbfdce5c (diff) | |
download | chromium_src-a27308823dcdc002d05a355404dca725532e1697.zip chromium_src-a27308823dcdc002d05a355404dca725532e1697.tar.gz chromium_src-a27308823dcdc002d05a355404dca725532e1697.tar.bz2 |
Adds TTL argument to HostCache::Set.
Re-lands r118489 but with static initializers removed.
BUG=25472, 107880
TEST=net_unittests
R=mmenke
Review URL: http://codereview.chromium.org/9226035
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118574 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/webui')
-rw-r--r-- | chrome/browser/ui/webui/net_internals/net_internals_ui.cc | 6 | ||||
-rw-r--r-- | chrome/browser/ui/webui/net_internals/net_internals_ui_browsertest.cc | 6 |
2 files changed, 3 insertions, 9 deletions
diff --git a/chrome/browser/ui/webui/net_internals/net_internals_ui.cc b/chrome/browser/ui/webui/net_internals/net_internals_ui.cc index 2184be8..a730d91 100644 --- a/chrome/browser/ui/webui/net_internals/net_internals_ui.cc +++ b/chrome/browser/ui/webui/net_internals/net_internals_ui.cc @@ -923,12 +923,6 @@ void NetInternalsMessageHandler::IOThreadImpl::OnGetHostResolverInfo( cache_info_dict->SetInteger( "capacity", static_cast<int>(cache->max_entries())); - cache_info_dict->SetInteger( - "ttl_success_ms", - static_cast<int>(cache->success_entry_ttl().InMilliseconds())); - cache_info_dict->SetInteger( - "ttl_failure_ms", - static_cast<int>(cache->failure_entry_ttl().InMilliseconds())); ListValue* entry_list = new ListValue(); diff --git a/chrome/browser/ui/webui/net_internals/net_internals_ui_browsertest.cc b/chrome/browser/ui/webui/net_internals/net_internals_ui_browsertest.cc index 261d2c1..59bbbb2 100644 --- a/chrome/browser/ui/webui/net_internals/net_internals_ui_browsertest.cc +++ b/chrome/browser/ui/webui/net_internals/net_internals_ui_browsertest.cc @@ -52,8 +52,7 @@ void AddCacheEntryOnIOThread(net::URLRequestContextGetter* context_getter, ASSERT_TRUE(cache); net::HostCache::Key key(hostname, net::ADDRESS_FAMILY_UNSPECIFIED, 0); - base::TimeTicks expires = - base::TimeTicks::Now() + base::TimeDelta::FromDays(expire_days_from_now); + base::TimeDelta ttl = base::TimeDelta::FromDays(expire_days_from_now); net::AddressList address_list; if (net_error == net::OK) { @@ -73,7 +72,8 @@ void AddCacheEntryOnIOThread(net::URLRequestContextGetter* context_getter, cache->Set(net::HostCache::Key(hostname, net::ADDRESS_FAMILY_UNSPECIFIED, 0), net_error, address_list, - expires); + base::TimeTicks::Now(), + ttl); } // Called on IO thread. Adds an entry to the list of known HTTP pipelining |