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

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

Issue 2929273002: Add the Play Store app search to the launcher. (Closed)
Patch Set: Fix unittest build failure. Created 3 years, 6 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/arc_app_result.cc
diff --git a/chrome/browser/ui/app_list/search/arc_app_result.cc b/chrome/browser/ui/app_list/search/arc_app_result.cc
index a0a6a3e59ca7fc1fa48b6e75e7038a3edd1e7a30..e1ed3cc69ffbb1c778f4a6ef1c486d0c98f963cc 100644
--- a/chrome/browser/ui/app_list/search/arc_app_result.cc
+++ b/chrome/browser/ui/app_list/search/arc_app_result.cc
@@ -66,8 +66,10 @@ std::unique_ptr<SearchResult> ArcAppResult::Duplicate() const {
}
ui::MenuModel* ArcAppResult::GetContextMenuModel() {
- context_menu_.reset(new ArcAppContextMenu(
- this, profile(), app_id(), controller()));
+ if (!context_menu_) {
+ context_menu_.reset(
+ new ArcAppContextMenu(this, profile(), app_id(), controller()));
+ }
return context_menu_->GetMenuModel();
}

Powered by Google App Engine
This is Rietveld 408576698