diff options
author | amruthraj@motorola.com <amruthraj@motorola.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-15 04:22:43 +0000 |
---|---|---|
committer | amruthraj@motorola.com <amruthraj@motorola.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-15 04:22:43 +0000 |
commit | de31a1e19d3d2fd7a195f3ac1ec84f8a815db05b (patch) | |
tree | 0e73634367bff08292e23609366ce17a16e50fa1 | |
parent | 7d5ad4239974cad5843fb605488a8c833716e56c (diff) | |
download | chromium_src-de31a1e19d3d2fd7a195f3ac1ec84f8a815db05b.zip chromium_src-de31a1e19d3d2fd7a195f3ac1ec84f8a815db05b.tar.gz chromium_src-de31a1e19d3d2fd7a195f3ac1ec84f8a815db05b.tar.bz2 |
While comparing last_selected values of two tabs, the one with a higher value means that it is recently selected and should be considered important.
TEST: Open Tab A, B, C. Do not pin them. Keep switching between B and C. Do not touch A. Verify that A is at the last in about:discards.
Patch by amruthraj@motorola.com
Review URL: http://codereview.chromium.org/7887029
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101241 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/oom_priority_manager.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/chrome/browser/oom_priority_manager.cc b/chrome/browser/oom_priority_manager.cc index 0bf49d2..06ce6c7 100644 --- a/chrome/browser/oom_priority_manager.cc +++ b/chrome/browser/oom_priority_manager.cc @@ -112,7 +112,7 @@ bool OomPriorityManager::CompareRendererStats(RendererStats first, // to take the one that uses more memory. if (abs((first.last_selected - second.last_selected).ToInternalValue()) < kTimeBucketInterval) - return first.last_selected < second.last_selected; + return first.last_selected > second.last_selected; return first.memory_used < second.memory_used; } |