| 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/browser/search_suggestion_parser.h" | 5 #include "components/omnibox/browser/search_suggestion_parser.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 bool relevance_from_server, | 55 bool relevance_from_server, |
| 56 AutocompleteMatchType::Type type, | 56 AutocompleteMatchType::Type type, |
| 57 const std::string& deletion_url) | 57 const std::string& deletion_url) |
| 58 : from_keyword_provider_(from_keyword_provider), | 58 : from_keyword_provider_(from_keyword_provider), |
| 59 type_(type), | 59 type_(type), |
| 60 relevance_(relevance), | 60 relevance_(relevance), |
| 61 relevance_from_server_(relevance_from_server), | 61 relevance_from_server_(relevance_from_server), |
| 62 received_after_last_keystroke_(true), | 62 received_after_last_keystroke_(true), |
| 63 deletion_url_(deletion_url) {} | 63 deletion_url_(deletion_url) {} |
| 64 | 64 |
| 65 SearchSuggestionParser::Result::Result(const Result& other) = default; |
| 66 |
| 65 SearchSuggestionParser::Result::~Result() {} | 67 SearchSuggestionParser::Result::~Result() {} |
| 66 | 68 |
| 67 // SearchSuggestionParser::SuggestResult --------------------------------------- | 69 // SearchSuggestionParser::SuggestResult --------------------------------------- |
| 68 | 70 |
| 69 SearchSuggestionParser::SuggestResult::SuggestResult( | 71 SearchSuggestionParser::SuggestResult::SuggestResult( |
| 70 const base::string16& suggestion, | 72 const base::string16& suggestion, |
| 71 AutocompleteMatchType::Type type, | 73 AutocompleteMatchType::Type type, |
| 72 const base::string16& match_contents, | 74 const base::string16& match_contents, |
| 73 const base::string16& match_contents_prefix, | 75 const base::string16& match_contents_prefix, |
| 74 const base::string16& annotation, | 76 const base::string16& annotation, |
| (...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 551 base::CollapseWhitespace(match_contents, false), | 553 base::CollapseWhitespace(match_contents, false), |
| 552 match_contents_prefix, annotation, answer_contents, answer_type_str, | 554 match_contents_prefix, annotation, answer_contents, answer_type_str, |
| 553 std::move(answer), suggest_query_params, deletion_url, | 555 std::move(answer), suggest_query_params, deletion_url, |
| 554 is_keyword_result, relevance, relevances != NULL, should_prefetch, | 556 is_keyword_result, relevance, relevances != NULL, should_prefetch, |
| 555 trimmed_input)); | 557 trimmed_input)); |
| 556 } | 558 } |
| 557 } | 559 } |
| 558 results->relevances_from_server = relevances != NULL; | 560 results->relevances_from_server = relevances != NULL; |
| 559 return true; | 561 return true; |
| 560 } | 562 } |
| OLD | NEW |