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

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

Issue 621823004: Simplifies the structure of app_list search a bit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 2 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/app_result.cc
diff --git a/chrome/browser/ui/app_list/search/app_result.cc b/chrome/browser/ui/app_list/search/app_result.cc
index 92c68fd284749490c72104031b0d89f67ce9774a..4f628b349c6c84b23d26f4b5721f2eb5b8ca62af 100644
--- a/chrome/browser/ui/app_list/search/app_result.cc
+++ b/chrome/browser/ui/app_list/search/app_result.cc
@@ -10,6 +10,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/app_list/app_context_menu.h"
#include "chrome/browser/ui/app_list/app_list_controller_delegate.h"
+#include "chrome/browser/ui/app_list/search/search_util.h"
#include "chrome/browser/ui/extensions/extension_enable_flow.h"
#include "chrome/browser/ui/webui/ntp/core_app_launcher_handler.h"
#include "content/public/browser/user_metrics.h"
@@ -89,6 +90,7 @@ void AppResult::UpdateFromLastLaunched(const base::Time& current_time,
}
void AppResult::Open(int event_flags) {
+ RecordHistogram(APP_SEARCH_RESULT);
const extensions::Extension* extension =
extensions::ExtensionSystem::Get(profile_)->extension_service()
->GetInstalledExtension(app_id_);
@@ -114,21 +116,14 @@ void AppResult::Open(int event_flags) {
event_flags);
}
-void AppResult::InvokeAction(int action_index, int event_flags) {}
-
-scoped_ptr<ChromeSearchResult> AppResult::Duplicate() {
- scoped_ptr<ChromeSearchResult> copy(
- new AppResult(profile_, app_id_, controller_));
+scoped_ptr<SearchResult> AppResult::Duplicate() {
+ scoped_ptr<SearchResult> copy(new AppResult(profile_, app_id_, controller_));
copy->set_title(title());
copy->set_title_tags(title_tags());
return copy.Pass();
}
-ChromeSearchResultType AppResult::GetType() {
- return APP_SEARCH_RESULT;
-}
-
ui::MenuModel* AppResult::GetContextMenuModel() {
if (!context_menu_) {
context_menu_.reset(new AppContextMenu(
« no previous file with comments | « chrome/browser/ui/app_list/search/app_result.h ('k') | chrome/browser/ui/app_list/search/app_search_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698