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

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

Issue 53283004: Adding support for forced URLs to TopSites. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed GetAllMostVisited. Created 7 years, 1 month 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 92e8eee3430fb9e7ec9225173d23a9cd0091dfe2..f373315f8dfbba38dd8c014552c8e7d3e676f84b 100644
--- a/chrome/browser/history/top_sites.h
+++ b/chrome/browser/history/top_sites.h
@@ -61,15 +61,15 @@ class TopSites
typedef base::Callback<void(const MostVisitedURLList&)>
GetMostVisitedURLsCallback;
- typedef std::vector<GetMostVisitedURLsCallback> PendingCallbacks;
- // Returns a list of most visited URLs via a callback. This may be invoked on
- // any thread.
- // NOTE: the callback is called immediately if we have the data cached. If
- // data is not available yet, callback will later be posted to the thread
- // called this function.
+ // Returns a list of most visited URLs via a callback, if
+ // |include_forced_urls| is false includes only non-forced URLs. This may be
+ // invoked on any thread. NOTE: the callback is called immediately if we have
+ // the data cached. If data is not available yet, callback will later be
+ // posted to the thread called this function.
virtual void GetMostVisitedURLs(
- const GetMostVisitedURLsCallback& callback) = 0;
+ const GetMostVisitedURLsCallback& callback,
+ bool include_forced_urls) = 0;
// Gets a thumbnail for a given page. Returns true iff we have the thumbnail.
// This may be invoked on any thread.
@@ -134,10 +134,15 @@ class TopSites
// return it without modification.
virtual const std::string& GetCanonicalURLString(const GURL& url) const = 0;
- // Returns true if the top sites list is full (i.e. we already have the
- // maximum number of top sites). This function also returns false if
- // TopSites isn't loaded yet.
- virtual bool IsFull() = 0;
+ // Returns true if the top sites list of non-forced URLs is full (i.e. we
+ // already have the maximum number of non-forced top sites). This function
+ // also returns false if TopSites isn't loaded yet.
+ virtual bool IsNonForcedFull() = 0;
+
+ // Returns true if the top sites list of forced URLs is full (i.e. we already
+ // have the maximum number of forced top sites). This function also returns
+ // false if TopSites isn't loaded yet.
+ virtual bool IsForcedFull() = 0;
virtual bool loaded() const = 0;
« no previous file with comments | « chrome/browser/extensions/api/top_sites/top_sites_apitest.cc ('k') | chrome/browser/history/top_sites_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698