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

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

Issue 2701123002: AppList Performance Optimization 2 (Closed)
Patch Set: Cache the tokenized name Created 3 years, 10 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: chrome/browser/ui/app_list/search/webstore/webstore_provider.cc
diff --git a/chrome/browser/ui/app_list/search/webstore/webstore_provider.cc b/chrome/browser/ui/app_list/search/webstore/webstore_provider.cc
index 044cfaca7751e398a314e3a6fc1f7037fa4c5801..12b0c57595eb5262b5e029944e760b1c5a320bb4 100644
--- a/chrome/browser/ui/app_list/search/webstore/webstore_provider.cc
+++ b/chrome/browser/ui/app_list/search/webstore/webstore_provider.cc
@@ -96,8 +96,7 @@ void WebstoreProvider::Start(bool /*is_voice_query*/,
// Add a placeholder result which when clicked will run the user's query in a
// browser. This placeholder is removed when the search results arrive.
- Add(std::unique_ptr<SearchResult>(
- new SearchWebstoreResult(profile_, controller_, query_)));
+ Add(base::MakeUnique<SearchWebstoreResult>(profile_, controller_, query_));
}
void WebstoreProvider::Stop() {
@@ -192,8 +191,8 @@ std::unique_ptr<SearchResult> WebstoreProvider::CreateResult(
if (!match.Calculate(query, title))
return std::unique_ptr<SearchResult>();
- std::unique_ptr<SearchResult> result(new WebstoreResult(
- profile_, app_id, icon_url, is_paid, item_type, controller_));
+ std::unique_ptr<SearchResult> result = base::MakeUnique<WebstoreResult>(
+ profile_, app_id, icon_url, is_paid, item_type, controller_);
result->UpdateFromMatch(title, match);
return result;
}

Powered by Google App Engine
This is Rietveld 408576698