Home | History | Annotate | Download | only in suggestions

Lines Matching full:suggestions

5 #include "components/suggestions/suggestions_service.h"
18 #include "components/suggestions/blacklist_store.h"
19 #include "components/suggestions/suggestions_store.h"
35 namespace suggestions {
49 UMA_HISTOGRAM_ENUMERATION("Suggestions.ResponseState", state,
65 // Runs each callback in |requestors| on |suggestions|, then deallocates
68 const SuggestionsProfile& suggestions,
72 if (!it->is_null()) it->Run(suggestions);
164 // suggestions if available.
181 // Post a task to serve the cached suggestions if the request hasn't completed
241 SuggestionsProfile* suggestions, int64 default_timestamp_usec) {
242 for (int i = 0; i < suggestions->suggestions_size(); ++i) {
243 ChromeSuggestion* suggestion = suggestions->mutable_suggestions(i);
302 UMA_HISTOGRAM_SPARSE_SLOWLY("Suggestions.FailedRequestErrorCode",
304 DVLOG(1) << "Suggestions server request failed with error: "
315 UMA_HISTOGRAM_SPARSE_SLOWLY("Suggestions.FetchResponseCode", response_code);
326 UMA_HISTOGRAM_MEDIUM_TIMES("Suggestions.FetchSuccessLatency", latency);
338 // Compute suggestions, and dispatch them to requestors. On error still
339 // dispatch empty suggestions.
340 SuggestionsProfile suggestions;
344 } else if (suggestions.ParseFromString(suggestions_data)) {
346 thumbnail_manager_->Initialize(suggestions);
350 SetDefaultExpiryTimestamp(&suggestions, now_usec + kDefaultExpiryUsec);
351 suggestions_store_->StoreSuggestions(suggestions);
354 suggestions_store_->LoadSuggestions(&suggestions);
355 thumbnail_manager_->Initialize(suggestions);
358 FilterAndServe(&suggestions);
371 SuggestionsProfile suggestions;
372 suggestions_store_->LoadSuggestions(&suggestions);
373 thumbnail_manager_->Initialize(suggestions);
374 FilterAndServe(&suggestions);
377 void SuggestionsService::FilterAndServe(SuggestionsProfile* suggestions) {
378 blacklist_store_->FilterSuggestions(suggestions);
379 DispatchRequestsAndClear(*suggestions, &waiting_requestors_);
425 } // namespace suggestions