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

Unified Diff: chrome/browser/extensions/api/bluetooth/bluetooth_api_utils.cc

Issue 11075006: Moved bluetooth adapter files to device/bluetooth/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: renamed 'bluetooth' target to 'device_bluetooth'. Created 8 years, 2 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/extensions/api/bluetooth/bluetooth_api_utils.cc
diff --git a/chrome/browser/extensions/api/bluetooth/bluetooth_api_utils.cc b/chrome/browser/extensions/api/bluetooth/bluetooth_api_utils.cc
index 5503434f1d9b3b1b1e09a80a1d44f19e0e1b201d..d7e25bc10f1dff60fbf59287b8cf28f354f964b0 100644
--- a/chrome/browser/extensions/api/bluetooth/bluetooth_api_utils.cc
+++ b/chrome/browser/extensions/api/bluetooth/bluetooth_api_utils.cc
@@ -4,21 +4,18 @@
#include "chrome/browser/extensions/api/bluetooth/bluetooth_api_utils.h"
-#if defined(OS_CHROMEOS)
-
#include "base/utf_string_conversions.h"
#include "base/values.h"
-#include "chrome/browser/chromeos/bluetooth/bluetooth_device.h"
#include "chrome/common/extensions/api/experimental_bluetooth.h"
+#include "device/bluetooth/bluetooth_device.h"
namespace extensions {
namespace api {
namespace experimental_bluetooth {
-// Fill in a Device object from a chromeos::BluetoothDevice.
-void BluetoothDeviceToApiDevice(
- const chromeos::BluetoothDevice& device,
- Device* out) {
+// Fill in a Device object from a BluetoothDevice.
+void BluetoothDeviceToApiDevice(const device::BluetoothDevice& device,
+ Device* out) {
out->name = UTF16ToUTF8(device.GetName());
out->address = device.address();
out->paired = device.IsPaired();
@@ -27,7 +24,7 @@ void BluetoothDeviceToApiDevice(
}
// The caller takes ownership of the returned pointer.
-base::Value* BluetoothDeviceToValue(const chromeos::BluetoothDevice& device) {
+base::Value* BluetoothDeviceToValue(const device::BluetoothDevice& device) {
extensions::api::experimental_bluetooth::Device api_device;
BluetoothDeviceToApiDevice(device, &api_device);
return api_device.ToValue().release();
@@ -36,5 +33,3 @@ base::Value* BluetoothDeviceToValue(const chromeos::BluetoothDevice& device) {
} // namespace experimental_bluetooth
} // namespace api
} // namespace extensions
-
-#endif

Powered by Google App Engine
This is Rietveld 408576698