OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "components/autocomplete/search_suggestion_parser.h" | 5 #include "components/omnibox/search_suggestion_parser.h" |
6 | 6 |
7 #include "base/i18n/icu_string_conversions.h" | 7 #include "base/i18n/icu_string_conversions.h" |
8 #include "base/json/json_string_value_serializer.h" | 8 #include "base/json/json_string_value_serializer.h" |
9 #include "base/json/json_writer.h" | 9 #include "base/json/json_writer.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/strings/string_util.h" | 11 #include "base/strings/string_util.h" |
12 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
13 #include "base/values.h" | 13 #include "base/values.h" |
14 #include "components/autocomplete/autocomplete_input.h" | 14 #include "components/omnibox/autocomplete_input.h" |
15 #include "components/autocomplete/url_prefix.h" | 15 #include "components/omnibox/url_prefix.h" |
16 #include "components/url_fixer/url_fixer.h" | 16 #include "components/url_fixer/url_fixer.h" |
17 #include "net/base/net_util.h" | 17 #include "net/base/net_util.h" |
18 #include "net/http/http_response_headers.h" | 18 #include "net/http/http_response_headers.h" |
19 #include "net/url_request/url_fetcher.h" | 19 #include "net/url_request/url_fetcher.h" |
20 | 20 |
21 namespace { | 21 namespace { |
22 | 22 |
23 AutocompleteMatchType::Type GetAutocompleteMatchType(const std::string& type) { | 23 AutocompleteMatchType::Type GetAutocompleteMatchType(const std::string& type) { |
24 if (type == "ENTITY") | 24 if (type == "ENTITY") |
25 return AutocompleteMatchType::SEARCH_SUGGEST_ENTITY; | 25 return AutocompleteMatchType::SEARCH_SUGGEST_ENTITY; |
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
495 continue; | 495 continue; |
496 const base::DictionaryValue* imageData = NULL; | 496 const base::DictionaryValue* imageData = NULL; |
497 imageLine->GetDictionary("i", &imageData); | 497 imageLine->GetDictionary("i", &imageData); |
498 if (!imageData) | 498 if (!imageData) |
499 continue; | 499 continue; |
500 std::string imageUrl; | 500 std::string imageUrl; |
501 imageData->GetString("d", &imageUrl); | 501 imageData->GetString("d", &imageUrl); |
502 urls->push_back(GURL(imageUrl)); | 502 urls->push_back(GURL(imageUrl)); |
503 } | 503 } |
504 } | 504 } |
OLD | NEW |