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

Issue 9197009: Adds custom ttl argument to HostCache::Set. (Closed)

Created:
8 years, 11 months ago by szym
Modified:
8 years, 11 months ago
Reviewers:
cbentzel, mmenke
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org, eroman
Visibility:
Public.

Description

Adds custom ttl argument to HostCache::Set. BUG=25472, 107880 TEST=net_unittests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=118489

Patch Set 1 #

Patch Set 2 : Undo change for when TTL == 0. #

Total comments: 2

Patch Set 3 : Removed default TTLs from HostCache. #

Patch Set 4 : Removed default TTL from net-internals #

Total comments: 3

Patch Set 5 : Responded to review. #

Patch Set 6 : Delinted #

Patch Set 7 : Fixed incomplete refactor. #

Total comments: 9

Patch Set 8 : Addressed review. #

Patch Set 9 : fix #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+127 lines, -135 lines) Patch
M chrome/browser/resources/net_internals/dns_view.html View 1 2 3 1 chunk +0 lines, -4 lines 0 comments Download
M chrome/browser/resources/net_internals/dns_view.js View 1 2 3 2 chunks +0 lines, -6 lines 0 comments Download
M chrome/browser/ui/webui/net_internals/net_internals_ui.cc View 1 2 1 chunk +0 lines, -6 lines 0 comments Download
M chrome/browser/ui/webui/net_internals/net_internals_ui_browsertest.cc View 1 2 3 4 5 6 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/test/data/webui/net_internals/dns_view.js View 1 2 3 1 chunk +0 lines, -4 lines 0 comments Download
M net/base/host_cache.h View 1 2 3 4 5 4 chunks +6 lines, -17 lines 0 comments Download
M net/base/host_cache.cc View 1 2 3 4 4 chunks +6 lines, -26 lines 0 comments Download
M net/base/host_cache_unittest.cc View 1 2 3 4 5 6 7 23 chunks +65 lines, -44 lines 0 comments Download
M net/base/host_resolver_impl.cc View 1 2 3 4 2 chunks +11 lines, -3 lines 1 comment Download
M net/base/mock_host_resolver.cc View 1 2 3 4 5 6 7 8 3 chunks +10 lines, -5 lines 0 comments Download
M net/dns/async_host_resolver.cc View 1 2 3 4 5 6 7 3 chunks +14 lines, -7 lines 0 comments Download
M net/proxy/proxy_resolver_js_bindings.cc View 1 2 3 4 2 chunks +6 lines, -1 line 0 comments Download
M net/proxy/proxy_resolver_js_bindings_unittest.cc View 1 2 3 4 1 chunk +2 lines, -3 lines 0 comments Download
M net/proxy/proxy_resolver_v8.cc View 1 2 3 4 1 chunk +4 lines, -6 lines 0 comments Download

Messages

Total messages: 22 (0 generated)
szym
Let me know if you feel it needs a test.
8 years, 11 months ago (2012-01-12 20:56:49 UTC) #1
cbentzel
I think augmenting the Compact unit test for HostCache would be good here - don't ...
8 years, 11 months ago (2012-01-13 01:06:13 UTC) #2
szym
The effort to move default TTLs out of HostCache is small (see below), so I'll ...
8 years, 11 months ago (2012-01-14 16:30:54 UTC) #3
szym
Updated CL to remove default TTL values from HostCache. In the process I found that ...
8 years, 11 months ago (2012-01-18 21:57:17 UTC) #4
mmenke
On 2012/01/18 21:57:17, szym wrote: > Updated CL to remove default TTL values from HostCache. ...
8 years, 11 months ago (2012-01-18 22:06:02 UTC) #5
szym
I might have misunderstood the code. I read "expires" as the expiration date for the ...
8 years, 11 months ago (2012-01-18 22:10:43 UTC) #6
mmenke
On 2012/01/18 22:10:43, szym wrote: > I might have misunderstood the code. I read "expires" ...
8 years, 11 months ago (2012-01-18 22:21:34 UTC) #7
cbentzel
Looks like some of the NetInternals DNS browser tests are failing - I'll hold off ...
8 years, 11 months ago (2012-01-19 14:57:06 UTC) #8
cbentzel
Looks like some of the NetInternals DNS browser tests are failing - I'll hold off ...
8 years, 11 months ago (2012-01-19 14:57:07 UTC) #9
szym
On 2012/01/19 14:57:07, cbentzel wrote: > Looks like some of the NetInternals DNS browser tests ...
8 years, 11 months ago (2012-01-19 21:49:54 UTC) #10
mmenke
LGTM http://codereview.chromium.org/9197009/diff/18001/net/base/host_cache.h File net/base/host_cache.h (right): http://codereview.chromium.org/9197009/diff/18001/net/base/host_cache.h#newcode93 net/base/host_cache.h:93: base::TimeTicks now); nit: Cognitively, I think putting |now| ...
8 years, 11 months ago (2012-01-19 22:12:43 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/szym@chromium.org/9197009/18004
8 years, 11 months ago (2012-01-20 01:03:21 UTC) #12
commit-bot: I haz the power
Try job failure for 9197009-18004 (retry) (retry) (retry) on mac_rel for step "browser_tests". It's a ...
8 years, 11 months ago (2012-01-20 04:46:08 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/szym@chromium.org/9197009/18004
8 years, 11 months ago (2012-01-20 06:04:44 UTC) #14
commit-bot: I haz the power
Try job failure for 9197009-18004 (retry) on mac_rel for steps "browser_tests, ui_tests". It's a second ...
8 years, 11 months ago (2012-01-20 08:33:16 UTC) #15
cbentzel
http://codereview.chromium.org/9197009/diff/18004/net/base/host_cache_unittest.cc File net/base/host_cache_unittest.cc (right): http://codereview.chromium.org/9197009/diff/18004/net/base/host_cache_unittest.cc#newcode103 net/base/host_cache_unittest.cc:103: // We disallow use of negative entries. This test ...
8 years, 11 months ago (2012-01-20 11:04:53 UTC) #16
szym
http://codereview.chromium.org/9197009/diff/18004/net/base/host_cache_unittest.cc File net/base/host_cache_unittest.cc (right): http://codereview.chromium.org/9197009/diff/18004/net/base/host_cache_unittest.cc#newcode103 net/base/host_cache_unittest.cc:103: // We disallow use of negative entries. On 2012/01/20 ...
8 years, 11 months ago (2012-01-20 16:31:45 UTC) #17
cbentzel
LGTM, assuming you make the change to MockHostResolver. On Fri, Jan 20, 2012 at 11:31 ...
8 years, 11 months ago (2012-01-20 16:33:39 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/szym@chromium.org/9197009/29002
8 years, 11 months ago (2012-01-20 18:12:38 UTC) #19
commit-bot: I haz the power
Change committed as 118489
8 years, 11 months ago (2012-01-20 20:40:23 UTC) #20
mmenke
http://codereview.chromium.org/9197009/diff/29002/net/base/host_resolver_impl.cc File net/base/host_resolver_impl.cc (right): http://codereview.chromium.org/9197009/diff/29002/net/base/host_resolver_impl.cc#newcode54 net/base/host_resolver_impl.cc:54: const base::TimeDelta kCacheEntryTTL = base::TimeDelta::FromMinutes(1); The constants up here ...
8 years, 11 months ago (2012-01-20 22:02:16 UTC) #21
szym
8 years, 11 months ago (2012-01-20 22:05:27 UTC) #22
On 2012/01/20 22:02:16, Matt Menke wrote:
>
http://codereview.chromium.org/9197009/diff/29002/net/base/host_resolver_impl.cc
> File net/base/host_resolver_impl.cc (right):
> 
>
http://codereview.chromium.org/9197009/diff/29002/net/base/host_resolver_impl...
> net/base/host_resolver_impl.cc:54: const base::TimeDelta kCacheEntryTTL =
> base::TimeDelta::FromMinutes(1);
> The constants up here should just be the times as integers.

Should it be 
kCacheEntryTTL_min = 1
kCacheEntryTTL_sec = 60
kCacheEntryTTL_ms = 60000

Powered by Google App Engine
This is Rietveld 408576698