|
|
Created:
6 years, 7 months ago by aurimas (slooooooooow) Modified:
6 years, 7 months ago CC:
chromium-reviews Base URL:
svn://svn.chromium.org/chrome/trunk/src Visibility:
Public. |
Description[ChromeShell] Add suggestions for ChromeShell toolbar box.
BUG=
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=273052
Patch Set 1 #Patch Set 2 : Cleanup #Patch Set 3 : Remove spaces #
Total comments: 16
Patch Set 4 : nyquist's nits #
Total comments: 1
Patch Set 5 : Change the ownership of SuggestionPopup #Patch Set 6 : Remove unused variable #Patch Set 7 : Fixed TemplateUrlServiceTest #
Messages
Total messages: 41 (0 generated)
Hey Tommy, PTAL. Aurimas
https://codereview.chromium.org/287293004/diff/40001/chrome/android/shell/jav... File chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellSuggestionPopup.java (right): https://codereview.chromium.org/287293004/diff/40001/chrome/android/shell/jav... chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellSuggestionPopup.java:34: private Context mContext; mContext, mUrlField and mToolbar should be final. https://codereview.chromium.org/287293004/diff/40001/chrome/android/shell/jav... chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellSuggestionPopup.java:39: private AutocompleteController mAutocomplete; final Also, reorder all final members to be organized together so it is easy to see what can change over the lifetime of the object. https://codereview.chromium.org/287293004/diff/40001/chrome/android/shell/jav... chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellSuggestionPopup.java:46: public void afterTextChanged(final Editable editableText) { Like we discussed offline, this could all move to onTextChanged, which I would prefer. It just feels a little bit strange right now. But I'm fine with it staying where it is now since the reasoning is to keep this closer to how things are done downstream. https://codereview.chromium.org/287293004/diff/40001/chrome/android/shell/jav... chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellSuggestionPopup.java:73: if (mRequestSuggestions != null) mRequestSuggestions = null; Is this if-check really necessary? Seems like the outcome would be the same regardless. https://codereview.chromium.org/287293004/diff/40001/chrome/android/shell/jav... chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellSuggestionPopup.java:81: private class SuggestionArrayAdapter extends ArrayAdapter<OmniboxSuggestion> { Could this class be final too? https://codereview.chromium.org/287293004/diff/40001/chrome/android/shell/jav... chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellSuggestionPopup.java:82: private List<OmniboxSuggestion> mSuggestions; final https://codereview.chromium.org/287293004/diff/40001/chrome/android/shell/jav... chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellSuggestionPopup.java:84: public SuggestionArrayAdapter(Context context, int res, List<OmniboxSuggestion> objects) { s/objects/suggestions/ https://codereview.chromium.org/287293004/diff/40001/chrome/android/shell/jav... chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellSuggestionPopup.java:111: mContext = context; Is it OK for this to only be an activity? I.e. will it ever be used outside of the Activity lifespan? If we need it for more time, consider using context.getApplicationContext() and rename member field to mApplicationContext.
https://chromiumcodereview.appspot.com/287293004/diff/40001/chrome/android/sh... File chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellSuggestionPopup.java (right): https://chromiumcodereview.appspot.com/287293004/diff/40001/chrome/android/sh... chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellSuggestionPopup.java:34: private Context mContext; On 2014/05/21 18:53:08, nyquist wrote: > mContext, mUrlField and mToolbar should be final. Done. https://chromiumcodereview.appspot.com/287293004/diff/40001/chrome/android/sh... chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellSuggestionPopup.java:39: private AutocompleteController mAutocomplete; On 2014/05/21 18:53:08, nyquist wrote: > final > > Also, reorder all final members to be organized together so it is easy to see > what can change over the lifetime of the object. Done. https://chromiumcodereview.appspot.com/287293004/diff/40001/chrome/android/sh... chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellSuggestionPopup.java:46: public void afterTextChanged(final Editable editableText) { On 2014/05/21 18:53:08, nyquist wrote: > Like we discussed offline, this could all move to onTextChanged, which I would > prefer. It just feels a little bit strange right now. > > But I'm fine with it staying where it is now since the reasoning is to keep this > closer to how things are done downstream. Done. https://chromiumcodereview.appspot.com/287293004/diff/40001/chrome/android/sh... chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellSuggestionPopup.java:73: if (mRequestSuggestions != null) mRequestSuggestions = null; On 2014/05/21 18:53:08, nyquist wrote: > Is this if-check really necessary? Seems like the outcome would be the same > regardless. Done. https://chromiumcodereview.appspot.com/287293004/diff/40001/chrome/android/sh... chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellSuggestionPopup.java:81: private class SuggestionArrayAdapter extends ArrayAdapter<OmniboxSuggestion> { On 2014/05/21 18:53:08, nyquist wrote: > Could this class be final too? Done. https://chromiumcodereview.appspot.com/287293004/diff/40001/chrome/android/sh... chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellSuggestionPopup.java:82: private List<OmniboxSuggestion> mSuggestions; On 2014/05/21 18:53:08, nyquist wrote: > final Done. https://chromiumcodereview.appspot.com/287293004/diff/40001/chrome/android/sh... chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellSuggestionPopup.java:84: public SuggestionArrayAdapter(Context context, int res, List<OmniboxSuggestion> objects) { On 2014/05/21 18:53:08, nyquist wrote: > s/objects/suggestions/ Done. https://chromiumcodereview.appspot.com/287293004/diff/40001/chrome/android/sh... chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellSuggestionPopup.java:111: mContext = context; On 2014/05/21 18:53:08, nyquist wrote: > Is it OK for this to only be an activity? I.e. will it ever be used outside of > the Activity lifespan? If we need it for more time, consider using > context.getApplicationContext() and rename member field to mApplicationContext. I don't think it will every outlive the activity. New toolbar will be created if new activity is created.
lgtm
mariakhomenko: PTAL
lgtm https://chromiumcodereview.appspot.com/287293004/diff/60001/chrome/android/sh... File chrome/android/shell/java/src/org/chromium/chrome/shell/omnibox/SuggestionArrayAdapter.java (right): https://chromiumcodereview.appspot.com/287293004/diff/60001/chrome/android/sh... chrome/android/shell/java/src/org/chromium/chrome/shell/omnibox/SuggestionArrayAdapter.java:46: t2.setText(mSuggestions.get(position).getUrl()); FYI, you may want to check suggestion type and not show the URL for search suggestions? They are common and the URLs for them look very similar to each other, so it looks weird.
The CQ bit was checked by aurimas@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/aurimas@chromium.org/287293004/60001
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are real, and report flakes to chrome-troopers@google.com. The failing builders are: android_dbg on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_dbg/builds/18...) win_gpu_triggered_tests on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/win_gpu_triggered...)
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: win_gpu_triggered_tests on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/win_gpu_triggered...)
The CQ bit was checked by aurimas@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/aurimas@chromium.org/287293004/80001
The CQ bit was checked by aurimas@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/aurimas@chromium.org/287293004/100001
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are real, and report flakes to chrome-troopers@google.com. The failing builders are: android_dbg_triggered_tests on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_dbg_triggered...)
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: android_dbg_triggered_tests on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_dbg_triggered...)
The CQ bit was checked by aurimas@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/aurimas@chromium.org/287293004/100001
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are real, and report flakes to chrome-troopers@google.com. The failing builders are: android_dbg_triggered_tests on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_dbg_triggered...)
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: android_dbg_triggered_tests on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_dbg_triggered...)
The CQ bit was checked by aurimas@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/aurimas@chromium.org/287293004/100001
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are real, and report flakes to chrome-troopers@google.com. The failing builders are: android_dbg_triggered_tests on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_dbg_triggered...)
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: android_dbg_triggered_tests on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_dbg_triggered...)
The CQ bit was checked by aurimas@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/aurimas@chromium.org/287293004/100001
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are real, and report flakes to chrome-troopers@google.com. The failing builders are: android_dbg_triggered_tests on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_dbg_triggered...)
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: android_dbg_triggered_tests on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_dbg_triggered...)
The CQ bit was checked by aurimas@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/aurimas@chromium.org/287293004/100001
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_dbg_triggered_tests on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_dbg_triggered...)
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: android_dbg_triggered_tests on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_dbg_triggered...)
The CQ bit was checked by aurimas@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/aurimas@chromium.org/287293004/120001
Message was sent while issue was closed.
Change committed as 273052 |