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

Unified Diff: chrome/browser/ui/ash/tray_bluetooth_helper.cc

Issue 2753313002: cros: Init SystemTrayDelegate earlier to break bluetooth init dependency (Closed)
Patch Set: fix test Created 3 years, 9 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/ui/ash/tray_bluetooth_helper.cc
diff --git a/chrome/browser/ui/ash/tray_bluetooth_helper.cc b/chrome/browser/ui/ash/tray_bluetooth_helper.cc
index 89943a4b97ac9df8c3c50fd506cfee53b877dd33..f3373e0bbec4b96806ea4044ca19533266624c73 100644
--- a/chrome/browser/ui/ash/tray_bluetooth_helper.cc
+++ b/chrome/browser/ui/ash/tray_bluetooth_helper.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/ui/ash/tray_bluetooth_helper.h"
+#include "ash/common/system/tray/system_tray_delegate.h"
#include "ash/common/system/tray/system_tray_notifier.h"
#include "ash/common/wm_shell.h"
#include "base/bind.h"
@@ -11,7 +12,6 @@
#include "base/metrics/user_metrics.h"
#include "chrome/browser/chromeos/bluetooth/bluetooth_pairing_dialog.h"
#include "chrome/browser/ui/ash/system_tray_client.h"
-#include "chrome/browser/ui/ash/system_tray_delegate_chromeos.h"
#include "device/bluetooth/bluetooth_adapter.h"
#include "device/bluetooth/bluetooth_adapter_factory.h"
#include "device/bluetooth/bluetooth_device.h"
@@ -34,9 +34,7 @@ ash::SystemTrayNotifier* GetSystemTrayNotifier() {
} // namespace
-TrayBluetoothHelper::TrayBluetoothHelper(
- chromeos::SystemTrayDelegateChromeOS* system_tray_delegate)
- : system_tray_delegate_(system_tray_delegate), weak_ptr_factory_(this) {}
+TrayBluetoothHelper::TrayBluetoothHelper() : weak_ptr_factory_(this) {}
TrayBluetoothHelper::~TrayBluetoothHelper() {
if (adapter_)
@@ -54,10 +52,6 @@ void TrayBluetoothHelper::InitializeOnAdapterReady(
adapter_ = adapter;
CHECK(adapter_);
adapter_->AddObserver(this);
-
- // May be null in tests.
- if (system_tray_delegate_)
- system_tray_delegate_->InitializeOnAdapterReady();
}
void TrayBluetoothHelper::GetAvailableDevices(
« no previous file with comments | « chrome/browser/ui/ash/tray_bluetooth_helper.h ('k') | chrome/browser/ui/ash/tray_bluetooth_helper_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698