summaryrefslogtreecommitdiffstats
path: root/chrome/browser/history/top_sites_database.h
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-24 22:05:33 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-24 22:05:33 +0000
commitba66d9e8298ca4237fdf513f3e84233aa6d8152d (patch)
tree6f81cd2dec16948a2e5d5f3566274a7175d00c95 /chrome/browser/history/top_sites_database.h
parentabaf4e6fca4450bb6be70c03fbeb36e33903ad4b (diff)
downloadchromium_src-ba66d9e8298ca4237fdf513f3e84233aa6d8152d.zip
chromium_src-ba66d9e8298ca4237fdf513f3e84233aa6d8152d.tar.gz
chromium_src-ba66d9e8298ca4237fdf513f3e84233aa6d8152d.tar.bz2
Revert 63687 - Refactors TopSites so that it's hopefully easier to maintain and
doesn't suffer the plethora of threading issues that exist with the current version. Here's the breakdown of what was refactored: . TopSitesCache: Contains the most visited urls and thumbnails. . TopSitesBackend: All mutations to topsites data end up calling into the backend on the UI thread. TopSitesBackend processes the method on the DB thread calling through to the TopSitesDatabase. . TopSites: uses two TopSitesCache. One that contains the raw history data, the other contains the processed data (pinned/blacklisted). The processed cache can be accessed on any thread. TopSites waits until history loads to know if it should migrate or use it's own db. I could probably make these execute in parallel, but for now this is how it works. This patch also makes it so the dom ui accesses the thumbnails on the IO thread. BUG=56382 TEST=Make sure all your thumbnails are correctly updated and you don't see problems. Review URL: http://codereview.chromium.org/3440018 TBR=sky@chromium.org Review URL: http://codereview.chromium.org/4048005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63695 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/history/top_sites_database.h')
-rw-r--r--chrome/browser/history/top_sites_database.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/chrome/browser/history/top_sites_database.h b/chrome/browser/history/top_sites_database.h
index fdd3267..edfb4e5 100644
--- a/chrome/browser/history/top_sites_database.h
+++ b/chrome/browser/history/top_sites_database.h
@@ -11,12 +11,16 @@
#include "app/sql/connection.h"
#include "base/ref_counted.h"
-#include "chrome/browser/history/history_types.h"
#include "chrome/browser/history/url_database.h" // For DBCloseScoper.
class FilePath;
class RefCountedMemory;
class SkBitmap;
+class Images;
+
+namespace base {
+class Time;
+}
namespace history {
@@ -31,7 +35,8 @@ class TopSitesDatabase {
// Returns a list of all URLs currently in the table.
virtual void GetPageThumbnails(MostVisitedURLList* urls,
- URLToImagesMap* thumbnails) = 0;
+ std::map<GURL,
+ Images>* thumbnails) = 0;
// Set a thumbnail for a URL. |url_rank| is the position of the URL
// in the list of TopURLs, zero-based.