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

Side by Side Diff: components/proximity_auth/fake_connection.h

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 #ifndef COMPONENTS_PROXIMITY_AUTH_FAKE_CONNECTION_H 5 #ifndef COMPONENTS_PROXIMITY_AUTH_FAKE_CONNECTION_H
6 #define COMPONENTS_PROXIMITY_AUTH_FAKE_CONNECTION_H 6 #define COMPONENTS_PROXIMITY_AUTH_FAKE_CONNECTION_H
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "components/proximity_auth/connection.h" 9 #include "components/proximity_auth/connection.h"
10 10
(...skipping 16 matching lines...) Expand all
27 // container WireMessage format. 27 // container WireMessage format.
28 void ReceiveMessageWithPayload(const std::string& payload); 28 void ReceiveMessageWithPayload(const std::string& payload);
29 29
30 // Returns the current message in progress of being sent. 30 // Returns the current message in progress of being sent.
31 WireMessage* current_message() { return current_message_.get(); } 31 WireMessage* current_message() { return current_message_.get(); }
32 32
33 using Connection::SetStatus; 33 using Connection::SetStatus;
34 34
35 private: 35 private:
36 // Connection: 36 // Connection:
37 void SendMessageImpl(scoped_ptr<WireMessage> message) override; 37 void SendMessageImpl(std::unique_ptr<WireMessage> message) override;
38 scoped_ptr<WireMessage> DeserializeWireMessage( 38 std::unique_ptr<WireMessage> DeserializeWireMessage(
39 bool* is_incomplete_message) override; 39 bool* is_incomplete_message) override;
40 40
41 // The message currently being sent. Only set between a call to 41 // The message currently being sent. Only set between a call to
42 // SendMessageImpl() and FinishSendingMessageWithSuccess(). 42 // SendMessageImpl() and FinishSendingMessageWithSuccess().
43 scoped_ptr<WireMessage> current_message_; 43 std::unique_ptr<WireMessage> current_message_;
44 44
45 // The payload that should be returned when DeserializeWireMessage() is 45 // The payload that should be returned when DeserializeWireMessage() is
46 // called. 46 // called.
47 std::string pending_payload_; 47 std::string pending_payload_;
48 48
49 DISALLOW_COPY_AND_ASSIGN(FakeConnection); 49 DISALLOW_COPY_AND_ASSIGN(FakeConnection);
50 }; 50 };
51 51
52 } // namespace proximity_auth 52 } // namespace proximity_auth
53 53
54 #endif // COMPONENTS_PROXIMITY_AUTH_FAKE_CONNECTION_H 54 #endif // COMPONENTS_PROXIMITY_AUTH_FAKE_CONNECTION_H
OLDNEW
« no previous file with comments | « components/proximity_auth/device_to_device_secure_context_unittest.cc ('k') | components/proximity_auth/fake_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698