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

Side by Side Diff: cc/resources/ui_resource_request.cc

Issue 1866203004: Convert //cc from scoped_ptr to std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptrcc: 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
« no previous file with comments | « cc/resources/ui_resource_request.h ('k') | cc/resources/video_resource_updater.h » ('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 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 "cc/resources/ui_resource_request.h" 5 #include "cc/resources/ui_resource_request.h"
6 6
7 #include "base/memory/ptr_util.h"
8
7 namespace cc { 9 namespace cc {
8 10
9 UIResourceRequest::UIResourceRequest(UIResourceRequestType type, 11 UIResourceRequest::UIResourceRequest(UIResourceRequestType type,
10 UIResourceId id) 12 UIResourceId id)
11 : type_(type), id_(id) {} 13 : type_(type), id_(id) {}
12 14
13 UIResourceRequest::UIResourceRequest(UIResourceRequestType type, 15 UIResourceRequest::UIResourceRequest(UIResourceRequestType type,
14 UIResourceId id, 16 UIResourceId id,
15 const UIResourceBitmap& bitmap) 17 const UIResourceBitmap& bitmap)
16 : type_(type), id_(id), bitmap_(new UIResourceBitmap(bitmap)) {} 18 : type_(type), id_(id), bitmap_(new UIResourceBitmap(bitmap)) {}
17 19
18 UIResourceRequest::UIResourceRequest(const UIResourceRequest& request) { 20 UIResourceRequest::UIResourceRequest(const UIResourceRequest& request) {
19 (*this) = request; 21 (*this) = request;
20 } 22 }
21 23
22 UIResourceRequest& UIResourceRequest::operator=( 24 UIResourceRequest& UIResourceRequest::operator=(
23 const UIResourceRequest& request) { 25 const UIResourceRequest& request) {
24 type_ = request.type_; 26 type_ = request.type_;
25 id_ = request.id_; 27 id_ = request.id_;
26 if (request.bitmap_) { 28 if (request.bitmap_) {
27 bitmap_ = make_scoped_ptr(new UIResourceBitmap(*request.bitmap_.get())); 29 bitmap_ = base::WrapUnique(new UIResourceBitmap(*request.bitmap_.get()));
28 } else { 30 } else {
29 bitmap_ = nullptr; 31 bitmap_ = nullptr;
30 } 32 }
31 33
32 return *this; 34 return *this;
33 } 35 }
34 36
35 UIResourceRequest::~UIResourceRequest() {} 37 UIResourceRequest::~UIResourceRequest() {}
36 38
37 } // namespace cc 39 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/ui_resource_request.h ('k') | cc/resources/video_resource_updater.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698