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

Unified Diff: chrome/browser/ui/webui/options2/chromeos/bluetooth_options_handler2.cc

Issue 9994005: Separate handler initialization from page initialization (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move anything that indirectly calls JS to InitializePage Created 8 years, 8 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/webui/options2/chromeos/bluetooth_options_handler2.cc
diff --git a/chrome/browser/ui/webui/options2/chromeos/bluetooth_options_handler2.cc b/chrome/browser/ui/webui/options2/chromeos/bluetooth_options_handler2.cc
index d4f3a763aefd95924915d0acde26dcc3f04077e3..3786a9aecbc5665446934e67a1319a5a2360266b 100644
--- a/chrome/browser/ui/webui/options2/chromeos/bluetooth_options_handler2.cc
+++ b/chrome/browser/ui/webui/options2/chromeos/bluetooth_options_handler2.cc
@@ -166,10 +166,11 @@ void BluetoothOptionsHandler::RegisterMessages() {
void BluetoothOptionsHandler::InitializeHandler() {
adapter_.reset(BluetoothAdapter::CreateDefaultAdapter());
- adapter_->AddObserver(this);
}
void BluetoothOptionsHandler::InitializePage() {
+ adapter_->AddObserver(this);
+
// Show or hide the bluetooth settings and update the checkbox based
// on the current present/powered state.
AdapterPresentChanged(adapter_.get(), adapter_->IsPresent());

Powered by Google App Engine
This is Rietveld 408576698