Chromium Code Reviews| Index: chrome/browser/autocomplete/autocomplete_input.cc |
| diff --git a/chrome/browser/autocomplete/autocomplete_input.cc b/chrome/browser/autocomplete/autocomplete_input.cc |
| index 119758e1cd977c532c7460c1ff6c8fccc7bf8569..c23ffa144dc8aad31a8741392cc4feff6396b905 100644 |
| --- a/chrome/browser/autocomplete/autocomplete_input.cc |
| +++ b/chrome/browser/autocomplete/autocomplete_input.cc |
| @@ -498,24 +498,31 @@ void AutocompleteInput::UpdateText(const string16& text, |
| parts_ = parts; |
| } |
| +// TODO: This method does not take into account |parts_|, because |
| +// url_parse::Parsed struct does not provide == operator. |
|
Peter Kasting
2013/01/28 00:04:22
Does it need to? Seems like if the other items in
Bart N.
2013/01/29 21:28:17
Technically speaking, not really, because we allow
Peter Kasting
2013/01/29 21:32:24
Really, no one uses it? If so, then please nuke i
|
| bool AutocompleteInput::Equals(const AutocompleteInput& other) const { |
| return (text_ == other.text_) && |
| (cursor_position_ == other.cursor_position_) && |
| - (type_ == other.type_) && |
| (desired_tld_ == other.desired_tld_) && |
| + (type_ == other.type_) && |
| (scheme_ == other.scheme_) && |
| + (canonicalized_url_ == other.canonicalized_url_) && |
| (prevent_inline_autocomplete_ == other.prevent_inline_autocomplete_) && |
| (prefer_keyword_ == other.prefer_keyword_) && |
| + (allow_exact_keyword_match_ == other.allow_exact_keyword_match_) && |
| (matches_requested_ == other.matches_requested_); |
| } |
| void AutocompleteInput::Clear() { |
| text_.clear(); |
| cursor_position_ = string16::npos; |
| + desired_tld_.clear(); |
| type_ = INVALID; |
| parts_ = url_parse::Parsed(); |
| scheme_.clear(); |
| - desired_tld_.clear(); |
| + canonicalized_url_ = GURL(); |
| prevent_inline_autocomplete_ = false; |
| prefer_keyword_ = false; |
| + allow_exact_keyword_match_ = false; |
| + matches_requested_ = ALL_MATCHES; |
| } |