Move DeserializeJsonData() and UTF-8 conversion code to SearchSuggestionParser

Move BaseSearchProvider::DeserializeJsonData() and UTF-8 conversion code to SearchSuggestionParser.
To reduce the number of arguments of ParseSuggestResults(), add relevances_from_server and answers_image_urls to SearchSuggestionParser::Results.

BUG=388515
TEST=build

Review URL: https://codereview.chromium.org/423093013

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@286777 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/autocomplete/search_provider.cc b/chrome/browser/autocomplete/search_provider.cc
index 37de50a..bf495760 100644
--- a/chrome/browser/autocomplete/search_provider.cc
+++ b/chrome/browser/autocomplete/search_provider.cc
@@ -267,7 +267,6 @@
 }
 
 void SearchProvider::SortResults(bool is_keyword,
-                                 bool relevances_from_server,
                                  SearchSuggestionParser::Results* results) {
   // Ignore suggested scores for non-keyword matches in keyword mode; if the
   // server is allowed to score these, it could interfere with the user's
@@ -276,7 +275,7 @@
       !is_keyword && !providers_.keyword_provider().empty();
   // Apply calculated relevance scores to suggestions if valid relevances were
   // not provided or we're abandoning suggested scores entirely.
-  if (!relevances_from_server || abandon_suggested_scores) {
+  if (!results->relevances_from_server || abandon_suggested_scores) {
     ApplyCalculatedSuggestRelevance(&results->suggest_results);
     ApplyCalculatedNavigationRelevance(&results->navigation_results);
     // If abandoning scores entirely, also abandon the verbatim score.