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

Unified Diff: components/omnibox/search_suggestion_parser.h

Issue 894033006: SearchSuggestionParser: Use a StringPiece instead of modifying a string. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@jsonstring-stringpiece
Patch Set: Unconditionally call remove_prefix, since there is no penalty. Created 5 years, 10 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 | components/omnibox/search_suggestion_parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/omnibox/search_suggestion_parser.h
diff --git a/components/omnibox/search_suggestion_parser.h b/components/omnibox/search_suggestion_parser.h
index 4cba6023be22f75fa4a8c7b666ce9cf0a412d743..e86affb486a80816faf364463bb6dbf00fc2d662 100644
--- a/components/omnibox/search_suggestion_parser.h
+++ b/components/omnibox/search_suggestion_parser.h
@@ -10,6 +10,7 @@
#include "base/basictypes.h"
#include "base/strings/string16.h"
+#include "base/strings/string_piece.h"
#include "components/omnibox/autocomplete_match.h"
#include "components/omnibox/autocomplete_match_type.h"
#include "components/omnibox/suggestion_answer.h"
@@ -286,7 +287,8 @@ class SearchSuggestionParser {
// 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);
+ static scoped_ptr<base::Value> DeserializeJsonData(
+ base::StringPiece json_data);
// Parses results from the suggest server and updates the appropriate suggest
// and navigation result lists in |results|. |is_keyword_result| indicates
« no previous file with comments | « no previous file | components/omnibox/search_suggestion_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698