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 #ifndef COMPONENTS_OMNIBOX_BROWSER_SEARCH_SUGGESTION_PARSER_H_ | 5 #ifndef COMPONENTS_OMNIBOX_BROWSER_SEARCH_SUGGESTION_PARSER_H_ |
6 #define COMPONENTS_OMNIBOX_BROWSER_SEARCH_SUGGESTION_PARSER_H_ | 6 #define COMPONENTS_OMNIBOX_BROWSER_SEARCH_SUGGESTION_PARSER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 26 matching lines...) Expand all Loading... |
37 // TODO(msw) Extend these classes to generate their corresponding matches and | 37 // TODO(msw) Extend these classes to generate their corresponding matches and |
38 // other requisite data, in order to consolidate and simplify the | 38 // other requisite data, in order to consolidate and simplify the |
39 // highly fragmented SearchProvider logic for each Result type. | 39 // highly fragmented SearchProvider logic for each Result type. |
40 class Result { | 40 class Result { |
41 public: | 41 public: |
42 Result(bool from_keyword_provider, | 42 Result(bool from_keyword_provider, |
43 int relevance, | 43 int relevance, |
44 bool relevance_from_server, | 44 bool relevance_from_server, |
45 AutocompleteMatchType::Type type, | 45 AutocompleteMatchType::Type type, |
46 const std::string& deletion_url); | 46 const std::string& deletion_url); |
| 47 Result(const Result& other); |
47 virtual ~Result(); | 48 virtual ~Result(); |
48 | 49 |
49 bool from_keyword_provider() const { return from_keyword_provider_; } | 50 bool from_keyword_provider() const { return from_keyword_provider_; } |
50 | 51 |
51 const base::string16& match_contents() const { return match_contents_; } | 52 const base::string16& match_contents() const { return match_contents_; } |
52 const ACMatchClassifications& match_contents_class() const { | 53 const ACMatchClassifications& match_contents_class() const { |
53 return match_contents_class_; | 54 return match_contents_class_; |
54 } | 55 } |
55 | 56 |
56 AutocompleteMatchType::Type type() const { return type_; } | 57 AutocompleteMatchType::Type type() const { return type_; } |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 int default_result_relevance, | 302 int default_result_relevance, |
302 const std::string& languages, | 303 const std::string& languages, |
303 bool is_keyword_result, | 304 bool is_keyword_result, |
304 Results* results); | 305 Results* results); |
305 | 306 |
306 private: | 307 private: |
307 DISALLOW_COPY_AND_ASSIGN(SearchSuggestionParser); | 308 DISALLOW_COPY_AND_ASSIGN(SearchSuggestionParser); |
308 }; | 309 }; |
309 | 310 |
310 #endif // COMPONENTS_OMNIBOX_BROWSER_SEARCH_SUGGESTION_PARSER_H_ | 311 #endif // COMPONENTS_OMNIBOX_BROWSER_SEARCH_SUGGESTION_PARSER_H_ |
OLD | NEW |