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

Unified Diff: chrome/browser/android/contextualsearch/contextual_search_delegate.cc

Issue 2383963002: [TTS] Log a warning when Contextual Cards backend fails. (Closed)
Patch Set: Created 4 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/contextualsearch/contextual_search_delegate.cc
diff --git a/chrome/browser/android/contextualsearch/contextual_search_delegate.cc b/chrome/browser/android/contextualsearch/contextual_search_delegate.cc
index c00aa10772e1c58d35188ba6fb0dcfe3016d441a..650d0f3be0e8c819327be0436edca3d39341438a 100644
--- a/chrome/browser/android/contextualsearch/contextual_search_delegate.cc
+++ b/chrome/browser/android/contextualsearch/contextual_search_delegate.cc
@@ -501,6 +501,19 @@ void ContextualSearchDelegate::DecodeSearchTermFromJsonResponse(
// from the root.
dict->GetString(kContextualSearchCaption, caption);
dict->GetString(kContextualSearchThumbnail, thumbnail_url);
+ // For testing purposes check if there was a coca backend failure and
+ // flag that in the log.
+ // TODO(donnd): remove after full Coca integration.
+ bool contextual_cards_backend_responded = true;
+ dict->GetBoolean("coca_responded", &contextual_cards_backend_responded);
+ if (!contextual_cards_backend_responded) {
+ DVLOG(0) << "";
+ DVLOG(0) << "!!! CONTEXTUAL SEARCH WARNING !!!";
+ DVLOG(0)
+ << "The Contextual Cards backend did not respond to this "
+ "request!!! The backend server may not be configured or is down.";
+ DVLOG(0) << "";
+ }
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698