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

Side by Side Diff: components/proximity_auth/ble/fake_wire_message.cc

Issue 1912433002: Convert //components/proximity_auth from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/proximity_auth/ble/fake_wire_message.h"
6
7 #include <memory>
5 #include <string> 8 #include <string>
6 9
7 #include "base/macros.h" 10 #include "base/macros.h"
8 #include "base/memory/scoped_ptr.h"
9 #include "components/proximity_auth/ble/fake_wire_message.h"
10 #include "components/proximity_auth/wire_message.h" 11 #include "components/proximity_auth/wire_message.h"
11 12
12 namespace proximity_auth { 13 namespace proximity_auth {
13 14
14 FakeWireMessage::FakeWireMessage(const std::string& payload) 15 FakeWireMessage::FakeWireMessage(const std::string& payload)
15 : WireMessage(payload) {} 16 : WireMessage(payload) {}
16 17
17 scoped_ptr<FakeWireMessage> FakeWireMessage::Deserialize( 18 std::unique_ptr<FakeWireMessage> FakeWireMessage::Deserialize(
18 const std::string& serialized_message, 19 const std::string& serialized_message,
19 bool* is_incomplete_message) { 20 bool* is_incomplete_message) {
20 *is_incomplete_message = false; 21 *is_incomplete_message = false;
21 return scoped_ptr<FakeWireMessage>(new FakeWireMessage(serialized_message)); 22 return std::unique_ptr<FakeWireMessage>(
23 new FakeWireMessage(serialized_message));
22 } 24 }
23 25
24 std::string FakeWireMessage::Serialize() const { 26 std::string FakeWireMessage::Serialize() const {
25 return std::string(payload()); 27 return std::string(payload());
26 } 28 }
27 } 29 }
OLDNEW
« no previous file with comments | « components/proximity_auth/ble/fake_wire_message.h ('k') | components/proximity_auth/bluetooth_connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698