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

Side by Side Diff: ui/base/nine_image_painter_factory.cc

Issue 2259753003: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « ui/base/ime/linux/fake_input_method_context_factory.cc ('k') | ui/compositor/layer_owner.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ui/base/nine_image_painter_factory.h" 5 #include "ui/base/nine_image_painter_factory.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "ui/base/resource/resource_bundle.h" 10 #include "ui/base/resource/resource_bundle.h"
(...skipping 11 matching lines...) Expand all
22 if (image_ids[i] != 0) 22 if (image_ids[i] != 0)
23 images[i] = *rb.GetImageSkiaNamed(image_ids[i]); 23 images[i] = *rb.GetImageSkiaNamed(image_ids[i]);
24 } 24 }
25 return images; 25 return images;
26 } 26 }
27 27
28 } // namespace 28 } // namespace
29 29
30 std::unique_ptr<gfx::NineImagePainter> CreateNineImagePainter( 30 std::unique_ptr<gfx::NineImagePainter> CreateNineImagePainter(
31 const int image_ids[]) { 31 const int image_ids[]) {
32 return base::WrapUnique( 32 return base::MakeUnique<gfx::NineImagePainter>(ImageIdsToImages(image_ids));
33 new gfx::NineImagePainter(ImageIdsToImages(image_ids)));
34 } 33 }
35 34
36 } // namespace ui 35 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/ime/linux/fake_input_method_context_factory.cc ('k') | ui/compositor/layer_owner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698