summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-21 20:05:20 +0000
committerrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-21 20:05:20 +0000
commit93af5686841950c88bb794ab756f1457e7a9f9a8 (patch)
treec4ce615cf72511e7b7cefc96f4641eb9cfdad861 /net
parent804feb81d7f252fd9f5f6266004d8e893f845e35 (diff)
downloadchromium_src-93af5686841950c88bb794ab756f1457e7a9f9a8.zip
chromium_src-93af5686841950c88bb794ab756f1457e7a9f9a8.tar.gz
chromium_src-93af5686841950c88bb794ab756f1457e7a9f9a8.tar.bz2
Http Cache: Small adjustment to the logic that determines the reuse status of an entry.
This is just data collection for th einfinite cache simulation. BUG=151265 TEST=none Review URL: https://codereview.chromium.org/10957045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@158056 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r--net/http/infinite_cache.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/http/infinite_cache.cc b/net/http/infinite_cache.cc
index 9a7b118..c6b0829 100644
--- a/net/http/infinite_cache.cc
+++ b/net/http/infinite_cache.cc
@@ -869,19 +869,19 @@ bool InfiniteCache::Worker::CanReuse(const Details& old,
};
int reason = REUSE_OK;
- if (old.flags & NO_CACHE)
- reason = REUSE_NO_CACHE;
+ Time expiration = IntToTime(old.expiration);
+ if (expiration < Time::Now())
+ reason = REUSE_EXPIRED;
if (old.flags & EXPIRED)
reason = REUSE_ALWAYS_EXPIRED;
+ if (old.flags & NO_CACHE)
+ reason = REUSE_NO_CACHE;
+
if (old.flags & TRUNCATED)
reason = REUSE_TRUNCATED;
- Time expiration = IntToTime(old.expiration);
- if (expiration < Time::Now())
- reason = REUSE_EXPIRED;
-
if (old.vary_hash != current.vary_hash)
reason = REUSE_VARY;