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

Side by Side Diff: chrome/browser/ui/app_list/search/app_result.cc

Issue 15715003: Make app launcher Chrome Store UMA consistent with NTP. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: bs Created 7 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/app_list/search/app_result.h" 5 #include "chrome/browser/ui/app_list/search/app_result.h"
6 6
7 #include "chrome/browser/extensions/extension_service.h" 7 #include "chrome/browser/extensions/extension_service.h"
8 #include "chrome/browser/extensions/extension_system_factory.h" 8 #include "chrome/browser/extensions/extension_system_factory.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/ui/app_list/app_context_menu.h" 10 #include "chrome/browser/ui/app_list/app_context_menu.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 set_relevance(match.relevance()); 59 set_relevance(match.relevance());
60 } 60 }
61 61
62 void AppResult::Open(int event_flags) { 62 void AppResult::Open(int event_flags) {
63 const extensions::Extension* extension = 63 const extensions::Extension* extension =
64 extensions::ExtensionSystem::Get(profile_)->extension_service() 64 extensions::ExtensionSystem::Get(profile_)->extension_service()
65 ->GetInstalledExtension(app_id_); 65 ->GetInstalledExtension(app_id_);
66 if (!extension) 66 if (!extension)
67 return; 67 return;
68 68
69 AppLauncherHandler::RecordAppLaunchType( 69 AppLauncherHandler::RecordAppListSearchLaunch(extension);
70 extension_misc::APP_LAUNCH_APP_LIST_SEARCH,
71 extension->GetType());
72 content::RecordAction( 70 content::RecordAction(
73 content::UserMetricsAction("AppList_ClickOnAppFromSearch")); 71 content::UserMetricsAction("AppList_ClickOnAppFromSearch"));
72
74 controller_->ActivateApp(profile_, extension, event_flags); 73 controller_->ActivateApp(profile_, extension, event_flags);
75 } 74 }
76 75
77 void AppResult::InvokeAction(int action_index, int event_flags) {} 76 void AppResult::InvokeAction(int action_index, int event_flags) {}
78 77
79 scoped_ptr<ChromeSearchResult> AppResult::Duplicate() { 78 scoped_ptr<ChromeSearchResult> AppResult::Duplicate() {
80 scoped_ptr<ChromeSearchResult> copy( 79 scoped_ptr<ChromeSearchResult> copy(
81 new AppResult(profile_, app_id_, controller_)); 80 new AppResult(profile_, app_id_, controller_));
82 copy->set_title(title()); 81 copy->set_title(title());
83 copy->set_title_tags(title_tags()); 82 copy->set_title_tags(title_tags());
(...skipping 14 matching lines...) Expand all
98 extensions::IconImage* image) { 97 extensions::IconImage* image) {
99 DCHECK_EQ(icon_.get(), image); 98 DCHECK_EQ(icon_.get(), image);
100 SetIcon(icon_->image_skia()); 99 SetIcon(icon_->image_skia());
101 } 100 }
102 101
103 void AppResult::ExecuteLaunchCommand(int event_flags) { 102 void AppResult::ExecuteLaunchCommand(int event_flags) {
104 Open(event_flags); 103 Open(event_flags);
105 } 104 }
106 105
107 } // namespace app_list 106 } // namespace app_list
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/extension_app_item.cc ('k') | chrome/browser/ui/webui/ntp/app_launcher_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698