Index: device/bluetooth/bluetooth_utils.h |
diff --git a/chrome/browser/chromeos/bluetooth/bluetooth_utils.h b/device/bluetooth/bluetooth_utils.h |
similarity index 76% |
rename from chrome/browser/chromeos/bluetooth/bluetooth_utils.h |
rename to device/bluetooth/bluetooth_utils.h |
index 78f8ff5d85788ecb1211c937256e3b9a299ceb52..bd377765c89de78a69a0a5295ab969d737fa1ae1 100644 |
--- a/chrome/browser/chromeos/bluetooth/bluetooth_utils.h |
+++ b/device/bluetooth/bluetooth_utils.h |
@@ -2,22 +2,26 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_UTILS_H_ |
-#define CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_UTILS_H_ |
+#ifndef DEVICE_BLUETOOTH_BLUETOOTH_UTILS_H_ |
+#define DEVICE_BLUETOOTH_BLUETOOTH_UTILS_H_ |
#include <string> |
+#if defined(OS_CHROMEOS) |
#include <bluetooth/bluetooth.h> |
+#endif |
-namespace chromeos { |
-namespace bluetooth_utils { |
+namespace bluetooth { |
+namespace utils { |
+#if defined(OS_CHROMEOS) |
// Converts a bluetooth address in the format "B0:D0:9C:0F:3A:2D" into a |
// bdaddr_t struct. Returns true on success, false on failure. The contents |
// of |out_address| are zeroed on failure. |
// Note that the order is reversed upon conversion. For example, |
// "B0:D0:9C:0F:3A:2D" -> {"0x2d", "0x3a", "0x0f", "0x9c", "0xd0", "0xb0"} |
bool str2ba(const std::string& in_address, bdaddr_t* out_address); |
+#endif |
keybuk
2012/10/12 00:13:18
Where is this called from?
youngki
2012/10/12 01:50:12
Right now only bluetooth_socket_chromeos.cc and bl
|
// Takes a 4, 8 or 36 character UUID, validates it and returns it in 36 |
// character format with all hex digits lower case. If |uuid| is invalid, the |
@@ -31,8 +35,8 @@ bool str2ba(const std::string& in_address, bdaddr_t* out_address); |
// XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX |
std::string CanonicalUuid(std::string uuid); |
-} // namespace bluetooth_utils |
-} // namespace chromeos |
+} // namespace utils |
+} // namespace bluetooth |
-#endif // CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_UTILS_H_ |
+#endif // DEVICE_BLUETOOTH_BLUETOOTH_UTILS_H_ |