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

Unified Diff: chrome/browser/ui/app_list/search/app_result.cc

Issue 796793002: Make app list recommendations into their own DisplayType. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mathp_suggestions_search
Patch Set: fix_test Created 6 years 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: chrome/browser/ui/app_list/search/app_result.cc
diff --git a/chrome/browser/ui/app_list/search/app_result.cc b/chrome/browser/ui/app_list/search/app_result.cc
index 435dcf688bed431aeb37864d99332f22a33187f1..21f31c0b6ff661c18d32d9c9eb52a8469f53be8c 100644
--- a/chrome/browser/ui/app_list/search/app_result.cc
+++ b/chrome/browser/ui/app_list/search/app_result.cc
@@ -32,14 +32,15 @@ namespace app_list {
AppResult::AppResult(Profile* profile,
const std::string& app_id,
- AppListControllerDelegate* controller)
+ AppListControllerDelegate* controller,
+ bool is_recommendation)
: profile_(profile),
app_id_(app_id),
controller_(controller),
extension_registry_(NULL) {
set_id(extensions::Extension::GetBaseURLFromExtensionId(app_id_).spec());
if (app_list::switches::IsExperimentalAppListEnabled())
- set_display_type(DISPLAY_TILE);
+ set_display_type(is_recommendation ? DISPLAY_RECOMMENDATION : DISPLAY_TILE);
const extensions::Extension* extension =
extensions::ExtensionSystem::Get(profile_)->extension_service()
@@ -123,7 +124,9 @@ void AppResult::Open(int event_flags) {
}
scoped_ptr<SearchResult> AppResult::Duplicate() {
- scoped_ptr<SearchResult> copy(new AppResult(profile_, app_id_, controller_));
+ scoped_ptr<SearchResult> copy(
+ new AppResult(profile_, app_id_, controller_,
+ display_type() == DISPLAY_RECOMMENDATION));
copy->set_title(title());
copy->set_title_tags(title_tags());
« no previous file with comments | « chrome/browser/ui/app_list/search/app_result.h ('k') | chrome/browser/ui/app_list/search/app_search_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698