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

Side by Side Diff: components/suggestions/suggestions_service.h

Issue 423133003: [Suggestions Service] Add support for expiring the SuggestionsStore (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Expiry timestamps for suggestions Created 6 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_SUGGESTIONS_SUGGESTIONS_SERVICE_H_ 5 #ifndef COMPONENTS_SUGGESTIONS_SUGGESTIONS_SERVICE_H_
6 #define COMPONENTS_SUGGESTIONS_SUGGESTIONS_SERVICE_H_ 6 #define COMPONENTS_SUGGESTIONS_SUGGESTIONS_SERVICE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 void BlacklistURL(const GURL& candidate_url, 85 void BlacklistURL(const GURL& candidate_url,
86 const ResponseCallback& callback); 86 const ResponseCallback& callback);
87 87
88 // Determines which URL a blacklist request was for, irrespective of the 88 // Determines which URL a blacklist request was for, irrespective of the
89 // request's status. Returns false if |request| is not a blacklist request. 89 // request's status. Returns false if |request| is not a blacklist request.
90 static bool GetBlacklistedUrl(const net::URLFetcher& request, GURL* url); 90 static bool GetBlacklistedUrl(const net::URLFetcher& request, GURL* url);
91 91
92 // Register SuggestionsService related prefs in the Profile prefs. 92 // Register SuggestionsService related prefs in the Profile prefs.
93 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); 93 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
94 94
95 // adds deafult expiry timestamp if neccessary
manzagop (departed) 2014/07/31 15:31:50 Capitalize.
gayane -on leave until 09-2017 2014/08/04 13:46:30 Done.
96 void AddDefaultExpiryTimestamps(SuggestionsProfile* suggestions);
97
95 private: 98 private:
96 FRIEND_TEST_ALL_PREFIXES(SuggestionsServiceTest, BlacklistURLFails); 99 FRIEND_TEST_ALL_PREFIXES(SuggestionsServiceTest, BlacklistURLFails);
97 FRIEND_TEST_ALL_PREFIXES(SuggestionsServiceTest, FetchSuggestionsData); 100 FRIEND_TEST_ALL_PREFIXES(SuggestionsServiceTest, FetchSuggestionsData);
98 FRIEND_TEST_ALL_PREFIXES(SuggestionsServiceTest, UpdateBlacklistDelay); 101 FRIEND_TEST_ALL_PREFIXES(SuggestionsServiceTest, UpdateBlacklistDelay);
99 102
100 // Issue a request. 103 // Issue a request.
101 void IssueRequest(const GURL& url); 104 void IssueRequest(const GURL& url);
102 105
103 // Creates a request to the suggestions service, properly setting headers. 106 // Creates a request to the suggestions service, properly setting headers.
104 net::URLFetcher* CreateSuggestionsRequest(const GURL& url); 107 net::URLFetcher* CreateSuggestionsRequest(const GURL& url);
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 // Timeout (in ms) before serving requestors after a fetch suggestions request 183 // Timeout (in ms) before serving requestors after a fetch suggestions request
181 // has been issued. 184 // has been issued.
182 int request_timeout_ms_; 185 int request_timeout_ms_;
183 186
184 DISALLOW_COPY_AND_ASSIGN(SuggestionsService); 187 DISALLOW_COPY_AND_ASSIGN(SuggestionsService);
185 }; 188 };
186 189
187 } // namespace suggestions 190 } // namespace suggestions
188 191
189 #endif // COMPONENTS_SUGGESTIONS_SUGGESTIONS_SERVICE_H_ 192 #endif // COMPONENTS_SUGGESTIONS_SUGGESTIONS_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698