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

Unified Diff: chrome/browser/ui/app_list/search/webstore/webstore_result.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
« 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 2f0dfe8e5142023ce9bef644f862769cc8e68159..25c94df2b9e83c52cfb136d6938ad6b7ed4920a4 100644
--- a/chrome/browser/ui/app_list/search/webstore/webstore_result.cc
+++ b/chrome/browser/ui/app_list/search/webstore/webstore_result.cc
@@ -24,7 +24,6 @@
#include "chrome/grit/generated_resources.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/extension_system.h"
-#include "extensions/common/extension.h"
#include "extensions/common/extension_urls.h"
#include "grit/theme_resources.h"
#include "net/base/url_util.h"
@@ -48,7 +47,7 @@ WebstoreResult::WebstoreResult(Profile* profile,
install_tracker_(NULL),
extension_registry_(NULL),
weak_factory_(this) {
- set_id(extensions::Extension::GetBaseURLFromExtensionId(app_id_).spec());
+ set_id(GetResultIdFromExtensionId(app_id));
SetDefaultDetails();
@@ -72,6 +71,12 @@ WebstoreResult::~WebstoreResult() {
StopObservingRegistry();
}
+// static
+std::string WebstoreResult::GetResultIdFromExtensionId(
+ const std::string& extension_id) {
+ return extension_urls::GetWebstoreItemDetailURLPrefix() + extension_id;
+}
+
void WebstoreResult::Open(int event_flags) {
RecordHistogram(SEARCH_WEBSTORE_SEARCH_RESULT);
const GURL store_url = net::AppendQueryParameter(
« 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