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

Side by Side Diff: chrome/browser/ui/app_list/extension_app_model_builder.cc

Issue 2251263003: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 3 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/extension_app_model_builder.h" 5 #include "chrome/browser/ui/app_list/extension_app_model_builder.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 tracker_ = nullptr; 198 tracker_ = nullptr;
199 } 199 }
200 app_updater_.reset(); 200 app_updater_.reset();
201 } 201 }
202 202
203 std::unique_ptr<ExtensionAppItem> ExtensionAppModelBuilder::CreateAppItem( 203 std::unique_ptr<ExtensionAppItem> ExtensionAppModelBuilder::CreateAppItem(
204 const std::string& extension_id, 204 const std::string& extension_id,
205 const std::string& extension_name, 205 const std::string& extension_name,
206 const gfx::ImageSkia& installing_icon, 206 const gfx::ImageSkia& installing_icon,
207 bool is_platform_app) { 207 bool is_platform_app) {
208 return base::WrapUnique( 208 return base::MakeUnique<ExtensionAppItem>(
209 new ExtensionAppItem(profile(), GetSyncItem(extension_id), extension_id, 209 profile(), GetSyncItem(extension_id), extension_id, extension_name,
210 extension_name, installing_icon, is_platform_app)); 210 installing_icon, is_platform_app);
211 } 211 }
212 212
213 void ExtensionAppModelBuilder::BuildModel() { 213 void ExtensionAppModelBuilder::BuildModel() {
214 DCHECK(!tracker_); 214 DCHECK(!tracker_);
215 215
216 InitializePrefChangeRegistrars(); 216 InitializePrefChangeRegistrars();
217 217
218 tracker_ = controller()->GetInstallTrackerFor(profile()); 218 tracker_ = controller()->GetInstallTrackerFor(profile());
219 219
220 PopulateApps(); 220 PopulateApps();
(...skipping 17 matching lines...) Expand all
238 "", 238 "",
239 gfx::ImageSkia(), 239 gfx::ImageSkia(),
240 (*app)->is_platform_app())); 240 (*app)->is_platform_app()));
241 } 241 }
242 } 242 }
243 243
244 ExtensionAppItem* ExtensionAppModelBuilder::GetExtensionAppItem( 244 ExtensionAppItem* ExtensionAppModelBuilder::GetExtensionAppItem(
245 const std::string& extension_id) { 245 const std::string& extension_id) {
246 return static_cast<ExtensionAppItem*>(GetAppItem(extension_id)); 246 return static_cast<ExtensionAppItem*>(GetAppItem(extension_id));
247 } 247 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/arc/arc_app_model_builder.cc ('k') | chrome/browser/ui/app_list/launcher_page_event_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698