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

Side by Side Diff: chrome/browser/devtools/device/usb/android_usb_socket.h

Issue 2913693002: Replace deprecated base::NonThreadSafe in chrome/browser/devtools in favor of SequenceChecker. (Closed)
Patch Set: Created 3 years, 6 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 CHROME_BROWSER_DEVTOOLS_DEVICE_USB_ANDROID_USB_SOCKET_H_ 5 #ifndef CHROME_BROWSER_DEVTOOLS_DEVICE_USB_ANDROID_USB_SOCKET_H_
6 #define CHROME_BROWSER_DEVTOOLS_DEVICE_USB_ANDROID_USB_SOCKET_H_ 6 #define CHROME_BROWSER_DEVTOOLS_DEVICE_USB_ANDROID_USB_SOCKET_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
11 11
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
15 #include "base/threading/non_thread_safe.h" 15 #include "base/sequence_checker.h"
16 #include "chrome/browser/devtools/device/usb/android_usb_device.h" 16 #include "chrome/browser/devtools/device/usb/android_usb_device.h"
17 #include "net/base/ip_endpoint.h" 17 #include "net/base/ip_endpoint.h"
18 #include "net/log/net_log_with_source.h" 18 #include "net/log/net_log_with_source.h"
19 #include "net/socket/stream_socket.h" 19 #include "net/socket/stream_socket.h"
20 20
21 class AndroidUsbSocket : public net::StreamSocket, 21 class AndroidUsbSocket : public net::StreamSocket {
22 public base::NonThreadSafe {
23 public: 22 public:
24 AndroidUsbSocket(scoped_refptr<AndroidUsbDevice> device, 23 AndroidUsbSocket(scoped_refptr<AndroidUsbDevice> device,
25 uint32_t socket_id, 24 uint32_t socket_id,
26 const std::string& command, 25 const std::string& command,
27 base::Closure delete_callback); 26 base::Closure delete_callback);
28 ~AndroidUsbSocket() override; 27 ~AndroidUsbSocket() override;
29 28
30 void HandleIncoming(std::unique_ptr<AdbMessage> message); 29 void HandleIncoming(std::unique_ptr<AdbMessage> message);
31 30
32 void Terminated(bool closed_by_device); 31 void Terminated(bool closed_by_device);
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 net::NetLogWithSource net_log_; 69 net::NetLogWithSource net_log_;
71 bool is_connected_; 70 bool is_connected_;
72 std::string read_buffer_; 71 std::string read_buffer_;
73 scoped_refptr<net::IOBuffer> read_io_buffer_; 72 scoped_refptr<net::IOBuffer> read_io_buffer_;
74 int read_length_; 73 int read_length_;
75 int write_length_; 74 int write_length_;
76 net::CompletionCallback connect_callback_; 75 net::CompletionCallback connect_callback_;
77 net::CompletionCallback read_callback_; 76 net::CompletionCallback read_callback_;
78 net::CompletionCallback write_callback_; 77 net::CompletionCallback write_callback_;
79 base::Closure delete_callback_; 78 base::Closure delete_callback_;
79
80 SEQUENCE_CHECKER(sequence_checker_);
81
80 base::WeakPtrFactory<AndroidUsbSocket> weak_factory_; 82 base::WeakPtrFactory<AndroidUsbSocket> weak_factory_;
81 83
82 DISALLOW_COPY_AND_ASSIGN(AndroidUsbSocket); 84 DISALLOW_COPY_AND_ASSIGN(AndroidUsbSocket);
83 }; 85 };
84 86
85 #endif // CHROME_BROWSER_DEVTOOLS_DEVICE_USB_ANDROID_USB_SOCKET_H_ 87 #endif // CHROME_BROWSER_DEVTOOLS_DEVICE_USB_ANDROID_USB_SOCKET_H_
OLDNEW
« no previous file with comments | « chrome/browser/devtools/device/port_forwarding_controller.cc ('k') | chrome/browser/devtools/device/usb/android_usb_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698