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

Unified Diff: components/suggestions/suggestions_service.h

Issue 1259123002: SuggestionsService support for Desktop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « components/suggestions/blacklist_store.h ('k') | components/suggestions/suggestions_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/suggestions/suggestions_service.h
diff --git a/components/suggestions/suggestions_service.h b/components/suggestions/suggestions_service.h
index 34e03622c6c1dbca92d3acd9617f443aac9746b4..7f0aab3525adaa6cd9cefb2e16db3910f763b57c 100644
--- a/components/suggestions/suggestions_service.h
+++ b/components/suggestions/suggestions_service.h
@@ -40,6 +40,7 @@ class SuggestionsStore;
extern const char kSuggestionsURL[];
extern const char kSuggestionsBlacklistURLPrefix[];
extern const char kSuggestionsBlacklistURLParam[];
+extern const char kSuggestionsBlacklistClearURL[];
extern const int64 kDefaultExpiryUsec;
// An interface to fetch server suggestions asynchronously.
@@ -87,6 +88,9 @@ class SuggestionsService : public KeyedService, public net::URLFetcherDelegate {
const ResponseCallback& callback,
const base::Closure& fail_callback);
+ // Removes all URLs from the blacklist then invokes |callback|.
+ void ClearBlacklist(const ResponseCallback& callback);
+
// Determines which URL a blacklist request was for, irrespective of the
// request's status. Returns false if |request| is not a blacklist request.
static bool GetBlacklistedUrl(const net::URLFetcher& request, GURL* url);
@@ -106,6 +110,7 @@ class SuggestionsService : public KeyedService, public net::URLFetcherDelegate {
friend class SuggestionsServiceTest;
FRIEND_TEST_ALL_PREFIXES(SuggestionsServiceTest, BlacklistURL);
FRIEND_TEST_ALL_PREFIXES(SuggestionsServiceTest, BlacklistURLRequestFails);
+ FRIEND_TEST_ALL_PREFIXES(SuggestionsServiceTest, ClearBlacklist);
FRIEND_TEST_ALL_PREFIXES(SuggestionsServiceTest, UndoBlacklistURL);
FRIEND_TEST_ALL_PREFIXES(SuggestionsServiceTest, UndoBlacklistURLFailsHelper);
FRIEND_TEST_ALL_PREFIXES(SuggestionsServiceTest, UpdateBlacklistDelay);
@@ -138,6 +143,9 @@ class SuggestionsService : public KeyedService, public net::URLFetcherDelegate {
// Updates |scheduling_delay_| based on the success of the last request.
void UpdateBlacklistDelay(bool last_request_successful);
+ // Adds favicon URLs to suggestions profile.
+ void PopulateFaviconUrls(SuggestionsProfile* suggestions);
+
// Test seams.
base::TimeDelta blacklist_delay() const { return scheduling_delay_; }
void set_blacklist_delay(base::TimeDelta delay) {
« no previous file with comments | « components/suggestions/blacklist_store.h ('k') | components/suggestions/suggestions_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698