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

Unified Diff: chrome/browser/ui/app_list/search/suggestions/suggestions_search_provider.cc

Issue 2568133005: [SuggestionsService] Split SuggestionsService interface from impl (Closed)
Patch Set: Moved impl to dedicated file. Created 4 years 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 | « chrome/browser/search/suggestions/suggestions_ui.cc ('k') | components/ntp_tiles/most_visited_sites.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/app_list/search/suggestions/suggestions_search_provider.cc
diff --git a/chrome/browser/ui/app_list/search/suggestions/suggestions_search_provider.cc b/chrome/browser/ui/app_list/search/suggestions/suggestions_search_provider.cc
index 9b5678b3505bdd51d4a5e294f36d737727bd74a7..f3cffa82ad85e1b0fbb9a7101445ac123f3d3294 100644
--- a/chrome/browser/ui/app_list/search/suggestions/suggestions_search_provider.cc
+++ b/chrome/browser/ui/app_list/search/suggestions/suggestions_search_provider.cc
@@ -44,8 +44,9 @@ void SuggestionsSearchProvider::Start(bool /*is_voice_query*/,
if (!query.empty())
return;
- const suggestions::SuggestionsProfile& suggestions_profile =
- suggestions_service_->GetSuggestionsDataFromCache();
+ const suggestions::SuggestionsProfile suggestions_profile =
+ suggestions_service_->GetSuggestionsDataFromCache().value_or(
+ suggestions::SuggestionsProfile());
for (int i = 0; i < suggestions_profile.suggestions_size(); ++i) {
const suggestions::ChromeSuggestion& suggestion =
suggestions_profile.suggestions(i);
« no previous file with comments | « chrome/browser/search/suggestions/suggestions_ui.cc ('k') | components/ntp_tiles/most_visited_sites.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698