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

Unified Diff: chrome/browser/autocomplete/search_provider.h

Issue 96753004: Ensure zero suggest can handle XSSI-escaped output. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing the return value in failure case Created 7 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
Index: chrome/browser/autocomplete/search_provider.h
diff --git a/chrome/browser/autocomplete/search_provider.h b/chrome/browser/autocomplete/search_provider.h
index e8c07d5f7b1e5133048c686a6ffa6f2139f52b24..cfff8a331e3d76828b0a2efb06a91fa7439c9fdf 100644
--- a/chrome/browser/autocomplete/search_provider.h
+++ b/chrome/browser/autocomplete/search_provider.h
@@ -410,6 +410,11 @@ class SearchProvider : public AutocompleteProvider,
const TemplateURL* template_url,
const AutocompleteInput& input);
+ // Parses JSON response received from the provider, stripping XSSI
+ // protection if needed. Returns the parsed data if successful, NULL
+ // otherwise.
+ static scoped_ptr<base::Value> DeserializeJsonData(std::string json_data);
+
// Parses results from the suggest server and updates the appropriate suggest
// and navigation result lists, depending on whether |is_keyword| is true.
// Returns whether the appropriate result list members were updated.
« no previous file with comments | « no previous file | chrome/browser/autocomplete/search_provider.cc » ('j') | chrome/browser/autocomplete/search_provider.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698