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

Unified Diff: device/hid/hid_connection.h

Issue 825523003: Convert HidDeviceInfo from a struct to a refcounted class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added TODO to remove friend class definitions. Created 5 years, 11 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 | « no previous file | device/hid/hid_connection.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/hid/hid_connection.h
diff --git a/device/hid/hid_connection.h b/device/hid/hid_connection.h
index 8c1bc0dc44b1f727b2d142ef093f790f5de703d6..1c7107580e994c1fff827bff7a4c24598fb6b38d 100644
--- a/device/hid/hid_connection.h
+++ b/device/hid/hid_connection.h
@@ -27,7 +27,7 @@ class HidConnection : public base::RefCountedThreadSafe<HidConnection> {
ReadCallback;
typedef base::Callback<void(bool success)> WriteCallback;
- const HidDeviceInfo& device_info() const { return device_info_; }
+ scoped_refptr<HidDeviceInfo> device_info() const { return device_info_; }
bool has_protected_collection() const { return has_protected_collection_; }
const base::ThreadChecker& thread_checker() const { return thread_checker_; }
bool closed() const { return closed_; }
@@ -59,7 +59,7 @@ class HidConnection : public base::RefCountedThreadSafe<HidConnection> {
protected:
friend class base::RefCountedThreadSafe<HidConnection>;
- explicit HidConnection(const HidDeviceInfo& device_info);
+ explicit HidConnection(scoped_refptr<HidDeviceInfo> device_info);
virtual ~HidConnection();
virtual void PlatformClose() = 0;
@@ -85,7 +85,7 @@ class HidConnection : public base::RefCountedThreadSafe<HidConnection> {
private:
bool IsReportIdProtected(uint8_t report_id);
- const HidDeviceInfo device_info_;
+ scoped_refptr<HidDeviceInfo> device_info_;
bool has_protected_collection_;
base::ThreadChecker thread_checker_;
bool closed_;
« no previous file with comments | « no previous file | device/hid/hid_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698