Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1868)

Unified Diff: chrome/browser/history/top_sites.h

Issue 14273023: Rebuild test history databases when starting up performance_ui_tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Speed up profile generation Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/history/top_sites.h
diff --git a/chrome/browser/history/top_sites.h b/chrome/browser/history/top_sites.h
index 7ea4fa60f41e170d4cfd9d006c685130357b905f..2b011c50c6d81df22da9acffce16753642801540 100644
--- a/chrome/browser/history/top_sites.h
+++ b/chrome/browser/history/top_sites.h
@@ -66,6 +66,13 @@ class TopSites
const gfx::Image& thumbnail,
const ThumbnailScore& score);
+ // While testing the history system, we want to set the thumbnail to a piece
+ // of static memory.
+ bool SetPageThumbnailToJPEGBytes(
+ const GURL& url,
+ const base::RefCountedMemory* memory,
+ const ThumbnailScore& score);
+
typedef base::Callback<void(const MostVisitedURLList&)>
GetMostVisitedURLsCallback;
typedef std::vector<GetMostVisitedURLsCallback> PendingCallbacks;
@@ -216,13 +223,13 @@ class TopSites
// reading last known top sites from the DB.
// Returns true if the thumbnail was set, false if the existing one is better.
bool SetPageThumbnailNoDB(const GURL& url,
- const base::RefCountedBytes* thumbnail_data,
+ const base::RefCountedMemory* thumbnail_data,
const ThumbnailScore& score);
- // A version of SetPageThumbnail that takes RefCountedBytes as
+ // A version of SetPageThumbnail that takes RefCountedMemory as
// returned by HistoryService.
bool SetPageThumbnailEncoded(const GURL& url,
- const base::RefCountedBytes* thumbnail,
+ const base::RefCountedMemory* thumbnail,
const ThumbnailScore& score);
// Encodes the bitmap to bytes for storage to the db. Returns true if the
@@ -236,7 +243,7 @@ class TopSites
// Add a thumbnail for an unknown url. See temp_thumbnails_map_.
void AddTemporaryThumbnail(const GURL& url,
- const base::RefCountedBytes* thumbnail,
+ const base::RefCountedMemory* thumbnail,
const ThumbnailScore& score);
// Called by our timer. Starts the query for the most visited sites.

Powered by Google App Engine
This is Rietveld 408576698