summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoramruthraj@motorola.com <amruthraj@motorola.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-15 04:22:43 +0000
committeramruthraj@motorola.com <amruthraj@motorola.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-15 04:22:43 +0000
commitde31a1e19d3d2fd7a195f3ac1ec84f8a815db05b (patch)
tree0e73634367bff08292e23609366ce17a16e50fa1
parent7d5ad4239974cad5843fb605488a8c833716e56c (diff)
downloadchromium_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.cc2
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;
}