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 package org.chromium.chrome.browser.omnibox; | 5 package org.chromium.chrome.browser.omnibox; |
6 | 6 |
7 import android.text.TextUtils; | 7 import android.text.TextUtils; |
8 | 8 |
9 import com.google.common.annotations.VisibleForTesting; | 9 import com.google.common.annotations.VisibleForTesting; |
10 | 10 |
(...skipping 12 matching lines...) Expand all Loading... |
23 private final String mFillIntoEdit; | 23 private final String mFillIntoEdit; |
24 private final String mUrl; | 24 private final String mUrl; |
25 private final String mFormattedUrl; | 25 private final String mFormattedUrl; |
26 private final int mRelevance; | 26 private final int mRelevance; |
27 private final int mTransition; | 27 private final int mTransition; |
28 private final boolean mIsStarred; | 28 private final boolean mIsStarred; |
29 private final boolean mIsDeletable; | 29 private final boolean mIsDeletable; |
30 | 30 |
31 /** | 31 /** |
32 * This should be kept in sync with AutocompleteMatch::Type | 32 * This should be kept in sync with AutocompleteMatch::Type |
33 * (see chrome/common/autocomplete_match_type.h). | 33 * (see components/autocomplete/autocomplete_match_type.h). |
34 * Negative types are specific to Chrome on Android front-end. | 34 * Negative types are specific to Chrome on Android front-end. |
35 */ | 35 */ |
36 public static enum Type { | 36 public static enum Type { |
37 VOICE_SUGGEST (-100), // A suggested search from the voice recogn
izer. | 37 VOICE_SUGGEST (-100), // A suggested search from the voice recogn
izer. |
38 | 38 |
39 URL_WHAT_YOU_TYPED (0), // The input as a URL. | 39 URL_WHAT_YOU_TYPED (0), // The input as a URL. |
40 HISTORY_URL (1), // A past page whose URL contains the input
. | 40 HISTORY_URL (1), // A past page whose URL contains the input
. |
41 HISTORY_TITLE (2), // A past page whose title contains the inp
ut. | 41 HISTORY_TITLE (2), // A past page whose title contains the inp
ut. |
42 HISTORY_BODY (3), // A past page whose body contains the inpu
t. | 42 HISTORY_BODY (3), // A past page whose body contains the inpu
t. |
43 HISTORY_KEYWORD (4), // A past page whose keyword contains the i
nput. | 43 HISTORY_KEYWORD (4), // A past page whose keyword contains the i
nput. |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 suggestion.mAnswerContents != null && | 218 suggestion.mAnswerContents != null && |
219 mAnswerContents.equals(suggestion.mAnswerContents)); | 219 mAnswerContents.equals(suggestion.mAnswerContents)); |
220 return mType == suggestion.mType | 220 return mType == suggestion.mType |
221 && mFillIntoEdit.equals(suggestion.mFillIntoEdit) | 221 && mFillIntoEdit.equals(suggestion.mFillIntoEdit) |
222 && mDisplayText.equals(suggestion.mDisplayText) | 222 && mDisplayText.equals(suggestion.mDisplayText) |
223 && answersAreEqual | 223 && answersAreEqual |
224 && mIsStarred == suggestion.mIsStarred | 224 && mIsStarred == suggestion.mIsStarred |
225 && mIsDeletable == suggestion.mIsDeletable; | 225 && mIsDeletable == suggestion.mIsDeletable; |
226 } | 226 } |
227 } | 227 } |
OLD | NEW |