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

Side by Side Diff: components/proximity_auth/connection_finder.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 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 #ifndef COMPONENTS_PROXIMITY_AUTH_CONNECTION_FINDER_H 5 #ifndef COMPONENTS_PROXIMITY_AUTH_CONNECTION_FINDER_H
6 #define COMPONENTS_PROXIMITY_AUTH_CONNECTION_FINDER_H 6 #define COMPONENTS_PROXIMITY_AUTH_CONNECTION_FINDER_H
7 7
8 #include <memory>
9
8 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
9 #include "base/macros.h" 11 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h"
11 12
12 namespace proximity_auth { 13 namespace proximity_auth {
13 14
14 class Connection; 15 class Connection;
15 16
16 // Interface for finding a connection to a remote device. 17 // Interface for finding a connection to a remote device.
17 class ConnectionFinder { 18 class ConnectionFinder {
18 public: 19 public:
19 virtual ~ConnectionFinder() {} 20 virtual ~ConnectionFinder() {}
20 21
21 // Attempts to find a connection to a remote device. The finder will try to 22 // Attempts to find a connection to a remote device. The finder will try to
22 // find the connection indefinitely until the finder is destroyed. Calls 23 // find the connection indefinitely until the finder is destroyed. Calls
23 // |connection_callback| with the open connection once the remote device is 24 // |connection_callback| with the open connection once the remote device is
24 // connected. 25 // connected.
25 // TODO(isherman): Can this just be done as part of the constructor? 26 // TODO(isherman): Can this just be done as part of the constructor?
26 typedef base::Callback<void(scoped_ptr<Connection> connection)> 27 typedef base::Callback<void(std::unique_ptr<Connection> connection)>
27 ConnectionCallback; 28 ConnectionCallback;
28 virtual void Find(const ConnectionCallback& connection_callback) = 0; 29 virtual void Find(const ConnectionCallback& connection_callback) = 0;
29 }; 30 };
30 31
31 } // namespace proximity_auth 32 } // namespace proximity_auth
32 33
33 #endif // COMPONENTS_PROXIMITY_AUTH_CONNECTION_FINDER_H 34 #endif // COMPONENTS_PROXIMITY_AUTH_CONNECTION_FINDER_H
OLDNEW
« no previous file with comments | « components/proximity_auth/connection.cc ('k') | components/proximity_auth/connection_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698