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/omnibox/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" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 | 42 |
43 SearchSuggestionParser::Result::Result(bool from_keyword_provider, | 43 SearchSuggestionParser::Result::Result(bool from_keyword_provider, |
44 int relevance, | 44 int relevance, |
45 bool relevance_from_server, | 45 bool relevance_from_server, |
46 AutocompleteMatchType::Type type, | 46 AutocompleteMatchType::Type type, |
47 const std::string& deletion_url) | 47 const std::string& deletion_url) |
48 : from_keyword_provider_(from_keyword_provider), | 48 : from_keyword_provider_(from_keyword_provider), |
49 type_(type), | 49 type_(type), |
50 relevance_(relevance), | 50 relevance_(relevance), |
51 relevance_from_server_(relevance_from_server), | 51 relevance_from_server_(relevance_from_server), |
52 received_after_last_keystroke_(true), | |
53 deletion_url_(deletion_url) {} | 52 deletion_url_(deletion_url) {} |
54 | 53 |
55 SearchSuggestionParser::Result::~Result() {} | 54 SearchSuggestionParser::Result::~Result() {} |
56 | 55 |
57 // SearchSuggestionParser::SuggestResult --------------------------------------- | 56 // SearchSuggestionParser::SuggestResult --------------------------------------- |
58 | 57 |
59 SearchSuggestionParser::SuggestResult::SuggestResult( | 58 SearchSuggestionParser::SuggestResult::SuggestResult( |
60 const base::string16& suggestion, | 59 const base::string16& suggestion, |
61 AutocompleteMatchType::Type type, | 60 AutocompleteMatchType::Type type, |
62 const base::string16& match_contents, | 61 const base::string16& match_contents, |
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
496 continue; | 495 continue; |
497 const base::DictionaryValue* imageData = NULL; | 496 const base::DictionaryValue* imageData = NULL; |
498 imageLine->GetDictionary("i", &imageData); | 497 imageLine->GetDictionary("i", &imageData); |
499 if (!imageData) | 498 if (!imageData) |
500 continue; | 499 continue; |
501 std::string imageUrl; | 500 std::string imageUrl; |
502 imageData->GetString("d", &imageUrl); | 501 imageData->GetString("d", &imageUrl); |
503 urls->push_back(GURL(imageUrl)); | 502 urls->push_back(GURL(imageUrl)); |
504 } | 503 } |
505 } | 504 } |
OLD | NEW |