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

Unified Diff: chrome/browser/devtools/adb/android_usb_device.h

Issue 230773003: DevTools: do not retain android_usb_devices in their manager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
Index: chrome/browser/devtools/adb/android_usb_device.h
diff --git a/chrome/browser/devtools/adb/android_usb_device.h b/chrome/browser/devtools/adb/android_usb_device.h
index 3a9d9b76c5147a3d79f7549fc306cc9c2c793a60..622dd06b4b94e77b97bed693c1d47c5e6b69ea7f 100644
--- a/chrome/browser/devtools/adb/android_usb_device.h
+++ b/chrome/browser/devtools/adb/android_usb_device.h
@@ -9,6 +9,7 @@
#include <queue>
#include <vector>
#include "base/memory/ref_counted.h"
+#include "base/memory/weak_ptr.h"
#include "chrome/browser/usb/usb_device_handle.h"
namespace base {
@@ -76,7 +77,8 @@ class AndroidUsbDevice : public base::RefCountedThreadSafe<AndroidUsbDevice> {
const std::string& serial,
int inbound_address,
int outbound_address,
- int zero_mask);
+ int zero_mask,
+ int interface_id);
void InitOnCallerThread();
@@ -105,7 +107,7 @@ class AndroidUsbDevice : public base::RefCountedThreadSafe<AndroidUsbDevice> {
scoped_refptr<net::IOBuffer> buffer,
size_t result);
- void ReadHeader(bool initial);
+ void ReadHeader();
void ParseHeader(UsbTransferStatus status,
scoped_refptr<net::IOBuffer> buffer,
size_t result);
@@ -124,6 +126,7 @@ class AndroidUsbDevice : public base::RefCountedThreadSafe<AndroidUsbDevice> {
void TransferError(UsbTransferStatus status);
+ void TerminateIfReleased();
void Terminate();
void SocketDeleted(uint32 socket_id);
@@ -138,6 +141,7 @@ class AndroidUsbDevice : public base::RefCountedThreadSafe<AndroidUsbDevice> {
int inbound_address_;
int outbound_address_;
int zero_mask_;
+ int interface_id_;
bool is_connected_;
bool signature_sent_;
@@ -156,6 +160,8 @@ class AndroidUsbDevice : public base::RefCountedThreadSafe<AndroidUsbDevice> {
typedef std::vector<scoped_refptr<AdbMessage> > PendingMessages;
PendingMessages pending_messages_;
+ base::WeakPtrFactory<AndroidUsbDevice> weak_factory_;
+
DISALLOW_COPY_AND_ASSIGN(AndroidUsbDevice);
};
« no previous file with comments | « no previous file | chrome/browser/devtools/adb/android_usb_device.cc » ('j') | chrome/browser/devtools/adb/android_usb_device.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698