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

Unified Diff: chrome/browser/chromeos/bluetooth/bluetooth_socket.h

Issue 10899037: Refactoring bluetooth API code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing styles and tess. Created 8 years, 3 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/chromeos/bluetooth/bluetooth_socket.h
diff --git a/chrome/browser/chromeos/bluetooth/bluetooth_socket.h b/chrome/browser/chromeos/bluetooth/bluetooth_socket.h
index 97a8679361aabd191e6460740aaf1c7ba37932fb..091f0c0da6c58fa401d29b2e984e490cdc0dfc7b 100644
--- a/chrome/browser/chromeos/bluetooth/bluetooth_socket.h
+++ b/chrome/browser/chromeos/bluetooth/bluetooth_socket.h
@@ -5,36 +5,21 @@
#ifndef CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_SOCKET_H_
#define CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_SOCKET_H_
-#include <string>
-
-#include "base/memory/weak_ptr.h"
-#include "chrome/browser/chromeos/bluetooth/bluetooth_service_record.h"
+#include "base/memory/ref_counted.h"
namespace chromeos {
-class BluetoothDevice;
-
// The BluetoothSocket class represents a socket to a specific service on
-// a BluetoothDevice. BluetoothSocket objects are ref counted and may outlive
-// both the BluetoothDevice and BluetoothAdapter that were involved in their
-// creation.
+// a BluetoothDevice. BluetoothSocket objects are ref counted and may
+// outlive both the BluetoothDevice and BluetoothAdapter that were involved in
+// their creation.
class BluetoothSocket : public base::RefCounted<BluetoothSocket> {
public:
- static scoped_refptr<BluetoothSocket> CreateBluetoothSocket(
- const BluetoothServiceRecord& service_record);
-
- int fd() const { return fd_; }
+ virtual int fd() const = 0;
bryeung 2012/09/13 19:52:57 please at least leave a TODO that this will be rep
youngki 2012/09/17 21:53:02 Done.
- private:
+ protected:
friend class base::RefCounted<BluetoothSocket>;
-
- BluetoothSocket(const std::string& address, int fd);
- virtual ~BluetoothSocket();
-
- const std::string address_;
- const int fd_;
-
- DISALLOW_COPY_AND_ASSIGN(BluetoothSocket);
+ virtual ~BluetoothSocket() {}
};
} // namespace chromeos

Powered by Google App Engine
This is Rietveld 408576698