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

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

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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 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/extension_app_result.h" 5 #include "chrome/browser/ui/app_list/search/extension_app_result.h"
6 6
7 #include "chrome/browser/extensions/extension_util.h" 7 #include "chrome/browser/extensions/extension_util.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/ui/app_list/app_list_controller_delegate.h" 9 #include "chrome/browser/ui/app_list/app_list_controller_delegate.h"
10 #include "chrome/browser/ui/app_list/extension_app_context_menu.h" 10 #include "chrome/browser/ui/app_list/extension_app_context_menu.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 base::UserMetricsAction("AppList_ClickOnAppFromSearch")); 78 base::UserMetricsAction("AppList_ClickOnAppFromSearch"));
79 } 79 }
80 80
81 controller()->ActivateApp( 81 controller()->ActivateApp(
82 profile(), 82 profile(),
83 extension, 83 extension,
84 AppListControllerDelegate::LAUNCH_FROM_APP_LIST_SEARCH, 84 AppListControllerDelegate::LAUNCH_FROM_APP_LIST_SEARCH,
85 event_flags); 85 event_flags);
86 } 86 }
87 87
88 scoped_ptr<SearchResult> ExtensionAppResult::Duplicate() const { 88 std::unique_ptr<SearchResult> ExtensionAppResult::Duplicate() const {
89 scoped_ptr<SearchResult> copy( 89 std::unique_ptr<SearchResult> copy(
90 new ExtensionAppResult(profile(), app_id(), controller(), 90 new ExtensionAppResult(profile(), app_id(), controller(),
91 display_type() == DISPLAY_RECOMMENDATION)); 91 display_type() == DISPLAY_RECOMMENDATION));
92 copy->set_title(title()); 92 copy->set_title(title());
93 copy->set_title_tags(title_tags()); 93 copy->set_title_tags(title_tags());
94 copy->set_relevance(relevance()); 94 copy->set_relevance(relevance());
95 95
96 return copy; 96 return copy;
97 } 97 }
98 98
99 ui::MenuModel* ExtensionAppResult::GetContextMenuModel() { 99 ui::MenuModel* ExtensionAppResult::GetContextMenuModel() {
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 const extensions::Extension* extension) { 178 const extensions::Extension* extension) {
179 UpdateIcon(); 179 UpdateIcon();
180 } 180 }
181 181
182 void ExtensionAppResult::OnShutdown(extensions::ExtensionRegistry* registry) { 182 void ExtensionAppResult::OnShutdown(extensions::ExtensionRegistry* registry) {
183 DCHECK_EQ(extension_registry_, registry); 183 DCHECK_EQ(extension_registry_, registry);
184 StopObservingExtensionRegistry(); 184 StopObservingExtensionRegistry();
185 } 185 }
186 186
187 } // namespace app_list 187 } // namespace app_list
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/search/extension_app_result.h ('k') | chrome/browser/ui/app_list/search/history_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698