| Index: chrome/browser/chromeos/upgrade_detector_chromeos.cc
|
| diff --git a/chrome/browser/chromeos/upgrade_detector_chromeos.cc b/chrome/browser/chromeos/upgrade_detector_chromeos.cc
|
| index 653c4bb5a3b2ffe0a054d68cbdfc65b376ace4e3..40d77fa7e558eec272d2f7eb934099b2165e0aad 100644
|
| --- a/chrome/browser/chromeos/upgrade_detector_chromeos.cc
|
| +++ b/chrome/browser/chromeos/upgrade_detector_chromeos.cc
|
| @@ -5,7 +5,7 @@
|
| #include "chrome/browser/chromeos/upgrade_detector_chromeos.h"
|
|
|
| #include "base/memory/singleton.h"
|
| -#include "chrome/browser/chromeos/cros/cros_library.h"
|
| +#include "chrome/browser/chromeos/dbus/dbus_thread_manager.h"
|
|
|
| namespace {
|
|
|
| @@ -15,6 +15,9 @@ const int kNotifyCycleTimeMs = 20 * 60 * 1000; // 20 minutes.
|
|
|
| } // namespace
|
|
|
| +using chromeos::DBusThreadManager;
|
| +using chromeos::UpdateEngineClient;
|
| +
|
| UpgradeDetectorChromeos::UpgradeDetectorChromeos() : initialized_(false) {
|
| }
|
|
|
| @@ -22,22 +25,20 @@ UpgradeDetectorChromeos::~UpgradeDetectorChromeos() {
|
| }
|
|
|
| void UpgradeDetectorChromeos::Init() {
|
| - if (chromeos::CrosLibrary::Get())
|
| - chromeos::CrosLibrary::Get()->GetUpdateLibrary()->AddObserver(this);
|
| + DBusThreadManager::Get()->GetUpdateEngineClient()->AddObserver(this);
|
| initialized_ = true;
|
| }
|
|
|
| void UpgradeDetectorChromeos::Shutdown() {
|
| - // Init() may not be called from tests (ex. BrowserMainTest).
|
| + // Init() may not be called from tests.
|
| if (!initialized_)
|
| return;
|
| - if (chromeos::CrosLibrary::Get())
|
| - chromeos::CrosLibrary::Get()->GetUpdateLibrary()->RemoveObserver(this);
|
| + DBusThreadManager::Get()->GetUpdateEngineClient()->RemoveObserver(this);
|
| }
|
|
|
| void UpgradeDetectorChromeos::UpdateStatusChanged(
|
| - const chromeos::UpdateLibrary::Status& status) {
|
| - if (status.status != chromeos::UPDATE_STATUS_UPDATED_NEED_REBOOT)
|
| + const UpdateEngineClient::Status& status) {
|
| + if (status.status != UpdateEngineClient::UPDATE_STATUS_UPDATED_NEED_REBOOT)
|
| return;
|
|
|
| NotifyUpgradeDetected();
|
|
|