Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Unified Diff: ui/app_list/test/app_list_test_view_delegate.h

Issue 2972243002: Fix app list item indexing bug. (Closed)
Patch Set: khmel's comments. Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/app_list/test/app_list_test_view_delegate.h
diff --git a/ui/app_list/test/app_list_test_view_delegate.h b/ui/app_list/test/app_list_test_view_delegate.h
index 5cafa04f75baabc63c6762d83be0b90b1ee16463..b83ed15ad03090fa2bd4de9eee765d02e38e1039 100644
--- a/ui/app_list/test/app_list_test_view_delegate.h
+++ b/ui/app_list/test/app_list_test_view_delegate.h
@@ -31,7 +31,7 @@ class AppListTestViewDelegate : public AppListViewDelegate {
int dismiss_count() { return dismiss_count_; }
int open_search_result_count() { return open_search_result_count_; }
- std::map<size_t, int> open_search_result_counts() {
+ std::map<size_t, int> open_search_result_counts() const {
khmel 2017/07/18 15:04:01 nit: is any reason to return copy of this? would c
Jiaquan He 2017/07/18 15:58:16 Just tried. Other callers cannot access operator[]
oshima 2017/07/18 16:55:26 Hmm, won't it change the behavior? Looks like thi
Jiaquan He 2017/07/18 17:41:36 So I think it makes sense to return a reference he
Jiaquan He 2017/07/19 21:02:46 For why it doesn't change the behavior of the exis
oshima 2017/07/19 21:31:21 oh sorry, my mistake. Please ignore rename comment
oshima 2017/07/19 21:31:21 Can you make sure the ranking exist in the map? th
Jiaquan He 2017/07/19 21:54:23 Please check the new PS.
return open_search_result_counts_;
}

Powered by Google App Engine
This is Rietveld 408576698