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

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

Issue 898273002: app_list::SearchResult: Duplicate() is const. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix. Created 5 years, 10 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
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 "base/time/time.h" 7 #include "base/time/time.h"
8 #include "chrome/browser/extensions/extension_service.h" 8 #include "chrome/browser/extensions/extension_service.h"
9 #include "chrome/browser/extensions/extension_util.h" 9 #include "chrome/browser/extensions/extension_util.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 content::RecordAction( 116 content::RecordAction(
117 base::UserMetricsAction("AppList_ClickOnAppFromSearch")); 117 base::UserMetricsAction("AppList_ClickOnAppFromSearch"));
118 118
119 controller_->ActivateApp( 119 controller_->ActivateApp(
120 profile_, 120 profile_,
121 extension, 121 extension,
122 AppListControllerDelegate::LAUNCH_FROM_APP_LIST_SEARCH, 122 AppListControllerDelegate::LAUNCH_FROM_APP_LIST_SEARCH,
123 event_flags); 123 event_flags);
124 } 124 }
125 125
126 scoped_ptr<SearchResult> AppResult::Duplicate() { 126 scoped_ptr<SearchResult> AppResult::Duplicate() const {
127 scoped_ptr<SearchResult> copy( 127 scoped_ptr<SearchResult> copy(
128 new AppResult(profile_, app_id_, controller_, 128 new AppResult(profile_, app_id_, controller_,
129 display_type() == DISPLAY_RECOMMENDATION)); 129 display_type() == DISPLAY_RECOMMENDATION));
130 copy->set_title(title()); 130 copy->set_title(title());
131 copy->set_title_tags(title_tags()); 131 copy->set_title_tags(title_tags());
132 132
133 return copy.Pass(); 133 return copy.Pass();
134 } 134 }
135 135
136 ui::MenuModel* AppResult::GetContextMenuModel() { 136 ui::MenuModel* AppResult::GetContextMenuModel() {
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 const extensions::Extension* extension) { 209 const extensions::Extension* extension) {
210 UpdateIcon(); 210 UpdateIcon();
211 } 211 }
212 212
213 void AppResult::OnShutdown(extensions::ExtensionRegistry* registry) { 213 void AppResult::OnShutdown(extensions::ExtensionRegistry* registry) {
214 DCHECK_EQ(extension_registry_, registry); 214 DCHECK_EQ(extension_registry_, registry);
215 StopObservingExtensionRegistry(); 215 StopObservingExtensionRegistry();
216 } 216 }
217 217
218 } // namespace app_list 218 } // namespace app_list
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/search/app_result.h ('k') | chrome/browser/ui/app_list/search/omnibox_result.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698