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

Unified Diff: chrome/browser/chromeos/system/ash_system_tray_delegate.cc

Issue 11819007: Changed DefaultAdapter to RunCallbackOnAdapterReady function. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created IsBluetoothSupported in BluetoothEventRouter to fix browser_tests. Created 7 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 | chrome/browser/extensions/api/bluetooth/bluetooth_event_router.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/system/ash_system_tray_delegate.cc
diff --git a/chrome/browser/chromeos/system/ash_system_tray_delegate.cc b/chrome/browser/chromeos/system/ash_system_tray_delegate.cc
index d71f6516e56c070def3feb83e04ee841a56d689f..1aeefe01ea5942b29bdbe769248eade15bc459ea 100644
--- a/chrome/browser/chromeos/system/ash_system_tray_delegate.cc
+++ b/chrome/browser/chromeos/system/ash_system_tray_delegate.cc
@@ -270,7 +270,15 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate,
network_icon_->SetResourceColorTheme(NetworkMenuIcon::COLOR_LIGHT);
network_icon_dark_->SetResourceColorTheme(NetworkMenuIcon::COLOR_DARK);
- bluetooth_adapter_ = device::BluetoothAdapterFactory::DefaultAdapter();
+ device::BluetoothAdapterFactory::RunCallbackOnAdapterReady(
+ base::Bind(&SystemTrayDelegate::InitializeOnAdapterReady,
+ ui_weak_ptr_factory_->GetWeakPtr()));
+ }
+
+ void InitializeOnAdapterReady(
+ scoped_refptr<device::BluetoothAdapter> adapter) {
+ bluetooth_adapter_ = adapter;
+ CHECK(bluetooth_adapter_);
bluetooth_adapter_->AddObserver(this);
local_state_registrar_.Init(g_browser_process->local_state());
« no previous file with comments | « no previous file | chrome/browser/extensions/api/bluetooth/bluetooth_event_router.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698