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 18:35:49 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-24 18:35:49 +0000
commitd0742d72600ba1eb33aff7d0ed43c8a118dcd141 (patch)
tree7f06db3fb511be1fc590c8519a096b331cb9881d /chrome/browser/history/top_sites_database.h
parent7ff65ca9f426a13726533d02f8edc6ce247064e2 (diff)
downloadchromium_src-d0742d72600ba1eb33aff7d0ed43c8a118dcd141.zip
chromium_src-d0742d72600ba1eb33aff7d0ed43c8a118dcd141.tar.gz
chromium_src-d0742d72600ba1eb33aff7d0ed43c8a118dcd141.tar.bz2
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 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63687 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, 2 insertions, 7 deletions
diff --git a/chrome/browser/history/top_sites_database.h b/chrome/browser/history/top_sites_database.h
index edfb4e5..fdd3267 100644
--- a/chrome/browser/history/top_sites_database.h
+++ b/chrome/browser/history/top_sites_database.h
@@ -11,16 +11,12 @@
#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 {
@@ -35,8 +31,7 @@ class TopSitesDatabase {
// Returns a list of all URLs currently in the table.
virtual void GetPageThumbnails(MostVisitedURLList* urls,
- std::map<GURL,
- Images>* thumbnails) = 0;
+ URLToImagesMap* thumbnails) = 0;
// Set a thumbnail for a URL. |url_rank| is the position of the URL
// in the list of TopURLs, zero-based.