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

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

Issue 1936953002: Don't return installed apps in webstore searches in Launcher (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address final reviews Created 4 years, 8 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 c7854aba07d60630b06b3834cf4257679cb036da..044cfaca7751e398a314e3a6fc1f7037fa4c5801 100644
--- a/chrome/browser/ui/app_list/search/webstore/webstore_provider.cc
+++ b/chrome/browser/ui/app_list/search/webstore/webstore_provider.cc
@@ -15,6 +15,7 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search/search.h"
+#include "chrome/browser/ui/app_list/app_list_controller_delegate.h"
#include "chrome/browser/ui/app_list/search/common/json_response_fetcher.h"
#include "chrome/browser/ui/app_list/search/search_webstore_result.h"
#include "chrome/browser/ui/app_list/search/webstore/webstore_result.h"
@@ -170,6 +171,10 @@ std::unique_ptr<SearchResult> WebstoreProvider::CreateResult(
return std::unique_ptr<SearchResult>();
}
+ // If an app is already installed, don't show it in results.
+ if (controller_->IsExtensionInstalled(profile_, app_id))
+ return std::unique_ptr<SearchResult>();
+
GURL icon_url(icon_url_string);
if (!icon_url.is_valid())
return std::unique_ptr<SearchResult>();

Powered by Google App Engine
This is Rietveld 408576698