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

Unified Diff: device/bluetooth/bluetooth_profile.cc

Issue 14487002: Bluetooth: Profile support for Chrome OS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add unit tests, and class comments Created 7 years, 7 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: device/bluetooth/bluetooth_profile.cc
diff --git a/device/bluetooth/bluetooth_profile.cc b/device/bluetooth/bluetooth_profile.cc
index 2ef94250fdec2f49d26e15d6b92421684cc0f905..6c59e5bcf0251afd2f425b0530c1cd6d1bbf1bf2 100644
--- a/device/bluetooth/bluetooth_profile.cc
+++ b/device/bluetooth/bluetooth_profile.cc
@@ -4,7 +4,9 @@
#include "device/bluetooth/bluetooth_profile.h"
-#if defined(OS_MACOSX)
+#if defined(OS_CHROMEOS)
+#include "device/bluetooth/bluetooth_profile_experimental_chromeos.h"
+#elif defined(OS_MACOSX)
#include "base/mac/mac_util.h"
#include "device/bluetooth/bluetooth_profile_mac.h"
#elif defined(OS_WIN)
@@ -43,16 +45,23 @@ BluetoothProfile::~BluetoothProfile() {
void BluetoothProfile::Register(const std::string& uuid,
const Options& options,
const ProfileCallback& callback) {
+#if defined(OS_CHROMEOS)
+ chromeos::BluetoothProfileExperimentalChromeOS* profile = NULL;
+ profile = new chromeos::BluetoothProfileExperimentalChromeOS();
+ profile->Init(uuid, options, callback);
+#elif defined(OS_MACOSX)
BluetoothProfile* profile = NULL;
-#if defined(OS_MACOSX)
if (base::mac::IsOSLionOrLater())
profile = new BluetoothProfileMac(uuid, options.name);
+ callback.Run(profile);
#elif defined(OS_WIN)
+ BluetoothProfile* profile = NULL;
profile = new BluetoothProfileWin(uuid, options.name);
-#endif
-
callback.Run(profile);
+#else
+ callback.Run(NULL);
+#endif
}
} // namespace device
« no previous file with comments | « device/bluetooth/bluetooth_device_experimental_chromeos.cc ('k') | device/bluetooth/bluetooth_profile_chromeos_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698