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

Side by Side Diff: ui/ozone/common/display_snapshot_proxy.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
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 "base/memory/ptr_util.h" 5 #include "base/memory/ptr_util.h"
6 6
7 #include "ui/ozone/common/display_snapshot_proxy.h" 7 #include "ui/ozone/common/display_snapshot_proxy.h"
8 8
9 #include <stddef.h> 9 #include <stddef.h>
10 10
(...skipping 20 matching lines...) Expand all
31 params.has_overscan, 31 params.has_overscan,
32 params.has_color_correction_matrix, 32 params.has_color_correction_matrix,
33 params.display_name, 33 params.display_name,
34 params.sys_path, 34 params.sys_path,
35 std::vector<std::unique_ptr<const DisplayMode>>(), 35 std::vector<std::unique_ptr<const DisplayMode>>(),
36 params.edid, 36 params.edid,
37 NULL, 37 NULL,
38 NULL), 38 NULL),
39 string_representation_(params.string_representation) { 39 string_representation_(params.string_representation) {
40 for (size_t i = 0; i < params.modes.size(); ++i) { 40 for (size_t i = 0; i < params.modes.size(); ++i) {
41 modes_.push_back(base::WrapUnique(new DisplayModeProxy(params.modes[i]))); 41 modes_.push_back(base::MakeUnique<DisplayModeProxy>(params.modes[i]));
42 42
43 if (params.has_current_mode && 43 if (params.has_current_mode &&
44 SameModes(params.modes[i], params.current_mode)) 44 SameModes(params.modes[i], params.current_mode))
45 current_mode_ = modes_.back().get(); 45 current_mode_ = modes_.back().get();
46 46
47 if (params.has_native_mode && 47 if (params.has_native_mode &&
48 SameModes(params.modes[i], params.native_mode)) 48 SameModes(params.modes[i], params.native_mode))
49 native_mode_ = modes_.back().get(); 49 native_mode_ = modes_.back().get();
50 } 50 }
51 51
52 product_id_ = params.product_id; 52 product_id_ = params.product_id;
53 maximum_cursor_size_ = params.maximum_cursor_size; 53 maximum_cursor_size_ = params.maximum_cursor_size;
54 } 54 }
55 55
56 DisplaySnapshotProxy::~DisplaySnapshotProxy() { 56 DisplaySnapshotProxy::~DisplaySnapshotProxy() {
57 } 57 }
58 58
59 std::string DisplaySnapshotProxy::ToString() const { 59 std::string DisplaySnapshotProxy::ToString() const {
60 return string_representation_; 60 return string_representation_;
61 } 61 }
62 62
63 } // namespace ui 63 } // namespace ui
OLDNEW
« no previous file with comments | « ui/message_center/views/message_popup_collection_unittest.cc ('k') | ui/ozone/common/native_display_delegate_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698