OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/autocomplete/autocomplete_match.h" | 5 #include "chrome/browser/autocomplete/autocomplete_match.h" |
6 | 6 |
7 #include "base/i18n/time_formatting.h" | 7 #include "base/i18n/time_formatting.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/string16.h" | 9 #include "base/string16.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 from_previous(false) { | 68 from_previous(false) { |
69 } | 69 } |
70 | 70 |
71 AutocompleteMatch::AutocompleteMatch(const AutocompleteMatch& match) | 71 AutocompleteMatch::AutocompleteMatch(const AutocompleteMatch& match) |
72 : provider(match.provider), | 72 : provider(match.provider), |
73 relevance(match.relevance), | 73 relevance(match.relevance), |
74 typed_count(match.typed_count), | 74 typed_count(match.typed_count), |
75 deletable(match.deletable), | 75 deletable(match.deletable), |
76 fill_into_edit(match.fill_into_edit), | 76 fill_into_edit(match.fill_into_edit), |
77 inline_autocomplete_offset(match.inline_autocomplete_offset), | 77 inline_autocomplete_offset(match.inline_autocomplete_offset), |
| 78 gray_suggestion(match.gray_suggestion), |
78 destination_url(match.destination_url), | 79 destination_url(match.destination_url), |
79 stripped_destination_url(match.stripped_destination_url), | 80 stripped_destination_url(match.stripped_destination_url), |
80 contents(match.contents), | 81 contents(match.contents), |
81 contents_class(match.contents_class), | 82 contents_class(match.contents_class), |
82 description(match.description), | 83 description(match.description), |
83 description_class(match.description_class), | 84 description_class(match.description_class), |
84 transition(match.transition), | 85 transition(match.transition), |
85 is_history_what_you_typed_match(match.is_history_what_you_typed_match), | 86 is_history_what_you_typed_match(match.is_history_what_you_typed_match), |
86 type(match.type), | 87 type(match.type), |
87 associated_keyword(match.associated_keyword.get() ? | 88 associated_keyword(match.associated_keyword.get() ? |
(...skipping 14 matching lines...) Expand all Loading... |
102 const AutocompleteMatch& match) { | 103 const AutocompleteMatch& match) { |
103 if (this == &match) | 104 if (this == &match) |
104 return *this; | 105 return *this; |
105 | 106 |
106 provider = match.provider; | 107 provider = match.provider; |
107 relevance = match.relevance; | 108 relevance = match.relevance; |
108 typed_count = match.typed_count; | 109 typed_count = match.typed_count; |
109 deletable = match.deletable; | 110 deletable = match.deletable; |
110 fill_into_edit = match.fill_into_edit; | 111 fill_into_edit = match.fill_into_edit; |
111 inline_autocomplete_offset = match.inline_autocomplete_offset; | 112 inline_autocomplete_offset = match.inline_autocomplete_offset; |
| 113 gray_suggestion = match.gray_suggestion; |
112 destination_url = match.destination_url; | 114 destination_url = match.destination_url; |
113 stripped_destination_url = match.stripped_destination_url; | 115 stripped_destination_url = match.stripped_destination_url; |
114 contents = match.contents; | 116 contents = match.contents; |
115 contents_class = match.contents_class; | 117 contents_class = match.contents_class; |
116 description = match.description; | 118 description = match.description; |
117 description_class = match.description_class; | 119 description_class = match.description_class; |
118 transition = match.transition; | 120 transition = match.transition; |
119 is_history_what_you_typed_match = match.is_history_what_you_typed_match; | 121 is_history_what_you_typed_match = match.is_history_what_you_typed_match; |
120 type = match.type; | 122 type = match.type; |
121 associated_keyword.reset(match.associated_keyword.get() ? | 123 associated_keyword.reset(match.associated_keyword.get() ? |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
468 << " is unsorted in relation to last offset of " << last_offset | 470 << " is unsorted in relation to last offset of " << last_offset |
469 << ". Provider: " << provider_name << "."; | 471 << ". Provider: " << provider_name << "."; |
470 DCHECK_LT(i->offset, text.length()) | 472 DCHECK_LT(i->offset, text.length()) |
471 << " Classification of [" << i->offset << "," << text.length() | 473 << " Classification of [" << i->offset << "," << text.length() |
472 << "] is out of bounds for \"" << text << "\". Provider: " | 474 << "] is out of bounds for \"" << text << "\". Provider: " |
473 << provider_name << "."; | 475 << provider_name << "."; |
474 last_offset = i->offset; | 476 last_offset = i->offset; |
475 } | 477 } |
476 } | 478 } |
477 #endif | 479 #endif |
OLD | NEW |