diff options
author | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-13 19:00:29 +0000 |
---|---|---|
committer | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-13 19:00:29 +0000 |
commit | 34cdd0557b61c9c98aa0510cadfcd814a8156b44 (patch) | |
tree | fc5ee6c4e81b184e5259a23ed1957528bf034615 /chrome/browser/history/history_backend.cc | |
parent | 5c65e10ad600bf4786f9eb8f6f30872bc61231e3 (diff) | |
download | chromium_src-34cdd0557b61c9c98aa0510cadfcd814a8156b44.zip chromium_src-34cdd0557b61c9c98aa0510cadfcd814a8156b44.tar.gz chromium_src-34cdd0557b61c9c98aa0510cadfcd814a8156b44.tar.bz2 |
This CL adds some UI to remove most-visited thumbnails from the New Tab Page.
The URL of removed thumbnails is added to a blacklist, which is a user pref.
I had to modify the VisitSegmentDatabase::QuerySegmentUsage not to return a
fixed number of items, as now we may filter the ones we get back.
Note: this adds between 20 and 30ms to the first NTP load on my machine (a
3 to 5% increase).
BUG=685
TEST=Open the NTP. Click the 'Edit thumbnails' link. Remove some thumbnails.
Press Done. Edit again, use the "Restore removed" link.
Review URL: http://codereview.chromium.org/67037
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13611 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/history/history_backend.cc')
-rw-r--r-- | chrome/browser/history/history_backend.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/chrome/browser/history/history_backend.cc b/chrome/browser/history/history_backend.cc index 48a8373..d045dc9 100644 --- a/chrome/browser/history/history_backend.cc +++ b/chrome/browser/history/history_backend.cc @@ -846,12 +846,13 @@ void HistoryBackend::SetSegmentPresentationIndex(SegmentID segment_id, void HistoryBackend::QuerySegmentUsage( scoped_refptr<QuerySegmentUsageRequest> request, - const Time from_time) { + const Time from_time, + int max_result_count) { if (request->canceled()) return; if (db_.get()) { - db_->QuerySegmentUsage(from_time, &request->value.get()); + db_->QuerySegmentUsage(from_time, max_result_count, &request->value.get()); // If this is the first time we query segments, invoke // DeleteOldSegmentData asynchronously. We do this to cleanup old |