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

Unified Diff: chrome/browser/ui/app_list/search/webstore/webstore_result.cc

Issue 1110903002: App Launcher: Webstore results are now ranked by title match. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: NULL -> nullptr. Created 5 years, 7 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
« no previous file with comments | « chrome/browser/ui/app_list/search/webstore/webstore_result.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/app_list/search/webstore/webstore_result.cc
diff --git a/chrome/browser/ui/app_list/search/webstore/webstore_result.cc b/chrome/browser/ui/app_list/search/webstore/webstore_result.cc
index 3fc90c8eafddc28c8c9b0fc306518e1610184fa0..303bfc5051441080f1ca8c1dd3fc87bdeff3a676 100644
--- a/chrome/browser/ui/app_list/search/webstore/webstore_result.cc
+++ b/chrome/browser/ui/app_list/search/webstore/webstore_result.cc
@@ -62,6 +62,7 @@ namespace app_list {
WebstoreResult::WebstoreResult(Profile* profile,
const std::string& app_id,
const std::string& localized_name,
+ double relevance,
const GURL& icon_url,
bool is_paid,
extensions::Manifest::Type item_type,
@@ -77,7 +78,7 @@ WebstoreResult::WebstoreResult(Profile* profile,
extension_registry_(NULL),
weak_factory_(this) {
set_id(extensions::Extension::GetBaseURLFromExtensionId(app_id_).spec());
- set_relevance(0.0); // What is the right value to use?
+ set_relevance(relevance);
set_title(base::UTF8ToUTF16(localized_name_));
SetDefaultDetails();
@@ -127,13 +128,9 @@ void WebstoreResult::InvokeAction(int action_index, int event_flags) {
}
scoped_ptr<SearchResult> WebstoreResult::Duplicate() const {
- return scoped_ptr<SearchResult>(new WebstoreResult(profile_,
- app_id_,
- localized_name_,
- icon_url_,
- is_paid_,
- item_type_,
- controller_));
+ return scoped_ptr<SearchResult>(
+ new WebstoreResult(profile_, app_id_, localized_name_, relevance(),
+ icon_url_, is_paid_, item_type_, controller_));
}
void WebstoreResult::InitAndStartObserving() {
« no previous file with comments | « chrome/browser/ui/app_list/search/webstore/webstore_result.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698