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

Side by Side Diff: cc/test/remote_proto_channel_bridge.cc

Issue 2258833002: 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, 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 | « cc/test/pixel_test.cc ('k') | cc/test/test_gpu_memory_buffer_manager.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/test/remote_proto_channel_bridge.h" 5 #include "cc/test/remote_proto_channel_bridge.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 case proto::CompositorMessageToImpl::UNKNOWN: 50 case proto::CompositorMessageToImpl::UNKNOWN:
51 return; 51 return;
52 case proto::CompositorMessageToImpl::INITIALIZE_IMPL: 52 case proto::CompositorMessageToImpl::INITIALIZE_IMPL:
53 test_hooks_->CreateRemoteClientHost(to_impl_proto); 53 test_hooks_->CreateRemoteClientHost(to_impl_proto);
54 return; 54 return;
55 case proto::CompositorMessageToImpl::CLOSE_IMPL: 55 case proto::CompositorMessageToImpl::CLOSE_IMPL:
56 test_hooks_->DestroyRemoteClientHost(); 56 test_hooks_->DestroyRemoteClientHost();
57 return; 57 return;
58 default: 58 default:
59 bridge_->channel_impl.OnProtoReceived( 59 bridge_->channel_impl.OnProtoReceived(
60 base::WrapUnique(new proto::CompositorMessage(proto))); 60 base::MakeUnique<proto::CompositorMessage>(proto));
61 } 61 }
62 } 62 }
63 63
64 FakeRemoteProtoChannelImpl::FakeRemoteProtoChannelImpl( 64 FakeRemoteProtoChannelImpl::FakeRemoteProtoChannelImpl(
65 RemoteProtoChannelBridge* bridge) 65 RemoteProtoChannelBridge* bridge)
66 : FakeRemoteProtoChannel(bridge) {} 66 : FakeRemoteProtoChannel(bridge) {}
67 67
68 void FakeRemoteProtoChannelImpl::SendCompositorProto( 68 void FakeRemoteProtoChannelImpl::SendCompositorProto(
69 const proto::CompositorMessage& proto) { 69 const proto::CompositorMessage& proto) {
70 bridge_->channel_main.OnProtoReceived( 70 bridge_->channel_main.OnProtoReceived(
71 base::WrapUnique(new proto::CompositorMessage(proto))); 71 base::MakeUnique<proto::CompositorMessage>(proto));
72 } 72 }
73 73
74 RemoteProtoChannelBridge::RemoteProtoChannelBridge(TestHooks* test_hooks) 74 RemoteProtoChannelBridge::RemoteProtoChannelBridge(TestHooks* test_hooks)
75 : channel_main(this, test_hooks), channel_impl(this) {} 75 : channel_main(this, test_hooks), channel_impl(this) {}
76 76
77 RemoteProtoChannelBridge::~RemoteProtoChannelBridge() {} 77 RemoteProtoChannelBridge::~RemoteProtoChannelBridge() {}
78 78
79 } // namespace cc 79 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/pixel_test.cc ('k') | cc/test/test_gpu_memory_buffer_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698