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

Unified Diff: tools/android/forwarder2/device_controller.h

Issue 1869503004: Convert //tools to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase, change iwyu fixes for converted directories to include <memory> 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/android/forwarder2/daemon.cc ('k') | tools/android/forwarder2/device_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/android/forwarder2/device_controller.h
diff --git a/tools/android/forwarder2/device_controller.h b/tools/android/forwarder2/device_controller.h
index 5a31e7be9e87ace53e9f75ce998b696d4d8ebe59..28fbea490aa06599c457acdb35c9e532e1e6b2b7 100644
--- a/tools/android/forwarder2/device_controller.h
+++ b/tools/android/forwarder2/device_controller.h
@@ -5,13 +5,13 @@
#ifndef TOOLS_ANDROID_FORWARDER2_DEVICE_CONTROLLER_H_
#define TOOLS_ANDROID_FORWARDER2_DEVICE_CONTROLLER_H_
+#include <memory>
#include <string>
#include "base/containers/hash_tables.h"
#include "base/macros.h"
#include "base/memory/linked_ptr.h"
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "tools/android/forwarder2/socket.h"
@@ -28,8 +28,9 @@ class DeviceListener;
// DeviceListener each).
class DeviceController {
public:
- static scoped_ptr<DeviceController> Create(const std::string& adb_unix_socket,
- int exit_notifier_fd);
+ static std::unique_ptr<DeviceController> Create(
+ const std::string& adb_unix_socket,
+ int exit_notifier_fd);
~DeviceController();
void Start();
@@ -38,7 +39,7 @@ class DeviceController {
typedef base::hash_map<
int /* port */, linked_ptr<DeviceListener> > ListenersMap;
- DeviceController(scoped_ptr<Socket> host_socket, int exit_notifier_fd);
+ DeviceController(std::unique_ptr<Socket> host_socket, int exit_notifier_fd);
void AcceptHostCommandSoon();
void AcceptHostCommandInternal();
@@ -47,9 +48,9 @@ class DeviceController {
// destroyed which is why a weak pointer is used.
static void DeleteListenerOnError(
const base::WeakPtr<DeviceController>& device_controller_ptr,
- scoped_ptr<DeviceListener> device_listener);
+ std::unique_ptr<DeviceListener> device_listener);
- const scoped_ptr<Socket> host_socket_;
+ const std::unique_ptr<Socket> host_socket_;
// Used to notify the controller to exit.
const int exit_notifier_fd_;
// Lets ensure DeviceListener instances are deleted on the thread they were
« no previous file with comments | « tools/android/forwarder2/daemon.cc ('k') | tools/android/forwarder2/device_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698