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

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

Issue 2542813002: [TTS] Log diagnostic output log for Contextual Cards. (Closed)
Patch Set: 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 | « 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 f170cd054592562ec444ceae0a4a2a609bcf4aa7..30023957026f5d73b65416eb09eebb9bb3fa1cd8 100644
--- a/chrome/browser/android/contextualsearch/contextual_search_delegate.cc
+++ b/chrome/browser/android/contextualsearch/contextual_search_delegate.cc
@@ -558,18 +558,16 @@ void ContextualSearchDelegate::DecodeSearchTermFromJsonResponse(
base::FeatureList::IsEnabled(
chrome::android::kContextualSearchSingleActions)) {
// Any Contextual Cards integration.
- // For testing purposes check if there was a Contextual Cards backend
- // failure and flag that in the log.
+ // For testing purposes check if there was a diagnostic from Contextual
+ // Cards and output that into the log.
// TODO(donnd): remove after full Contextual Cards 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) << "";
+ std::string contextual_cards_diagnostic;
+ dict->GetString("diagnostic", &contextual_cards_diagnostic);
+ if (contextual_cards_diagnostic.empty()) {
+ DVLOG(0) << "No diagnostic data in the response.";
+ } else {
+ DVLOG(0) << "The Contextual Cards backend response: ";
+ DVLOG(0) << contextual_cards_diagnostic;
}
}
}
« 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