| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/chromeos/arc/intent_helper/arc_settings_service.h" | 5 #include "chrome/browser/chromeos/arc/intent_helper/arc_settings_service.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 AddPrefToObserve(onc::prefs::kDeviceOpenNetworkConfiguration); | 289 AddPrefToObserve(onc::prefs::kDeviceOpenNetworkConfiguration); |
| 290 AddPrefToObserve(onc::prefs::kOpenNetworkConfiguration); | 290 AddPrefToObserve(onc::prefs::kOpenNetworkConfiguration); |
| 291 | 291 |
| 292 reporting_consent_subscription_ = CrosSettings::Get()->AddSettingsObserver( | 292 reporting_consent_subscription_ = CrosSettings::Get()->AddSettingsObserver( |
| 293 chromeos::kStatsReportingPref, | 293 chromeos::kStatsReportingPref, |
| 294 base::Bind(&ArcSettingsServiceImpl::SyncReportingConsent, | 294 base::Bind(&ArcSettingsServiceImpl::SyncReportingConsent, |
| 295 base::Unretained(this))); | 295 base::Unretained(this))); |
| 296 | 296 |
| 297 TimezoneSettings::GetInstance()->AddObserver(this); | 297 TimezoneSettings::GetInstance()->AddObserver(this); |
| 298 | 298 |
| 299 if (device::BluetoothAdapterFactory::IsBluetoothAdapterAvailable()) { | 299 if (device::BluetoothAdapterFactory::IsBluetoothSupported()) { |
| 300 device::BluetoothAdapterFactory::GetAdapter( | 300 device::BluetoothAdapterFactory::GetAdapter( |
| 301 base::Bind(&ArcSettingsServiceImpl::OnBluetoothAdapterInitialized, | 301 base::Bind(&ArcSettingsServiceImpl::OnBluetoothAdapterInitialized, |
| 302 weak_factory_.GetWeakPtr())); | 302 weak_factory_.GetWeakPtr())); |
| 303 } | 303 } |
| 304 | 304 |
| 305 chromeos::NetworkHandler::Get()->network_state_handler()->AddObserver( | 305 chromeos::NetworkHandler::Get()->network_state_handler()->AddObserver( |
| 306 this, FROM_HERE); | 306 this, FROM_HERE); |
| 307 } | 307 } |
| 308 | 308 |
| 309 void ArcSettingsServiceImpl::StopObservingSettingsChanges() { | 309 void ArcSettingsServiceImpl::StopObservingSettingsChanges() { |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 650 | 650 |
| 651 void ArcSettingsService::OnInstanceReady() { | 651 void ArcSettingsService::OnInstanceReady() { |
| 652 impl_.reset(new ArcSettingsServiceImpl(arc_bridge_service())); | 652 impl_.reset(new ArcSettingsServiceImpl(arc_bridge_service())); |
| 653 } | 653 } |
| 654 | 654 |
| 655 void ArcSettingsService::OnInstanceClosed() { | 655 void ArcSettingsService::OnInstanceClosed() { |
| 656 impl_.reset(); | 656 impl_.reset(); |
| 657 } | 657 } |
| 658 | 658 |
| 659 } // namespace arc | 659 } // namespace arc |
| OLD | NEW |