diff options
author | satorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-22 19:13:13 +0000 |
---|---|---|
committer | satorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-22 19:13:13 +0000 |
commit | 85c04ce437c3fd5253cb2468f4c17d3af020c87b (patch) | |
tree | 9a58a5e1522bbb1ff984d8dd9a902b624ebf9655 /chrome/browser/chromeos/upgrade_detector_chromeos.cc | |
parent | 5e0d181b8cb46ee569d5c2ac4d37953c0574666d (diff) | |
download | chromium_src-85c04ce437c3fd5253cb2468f4c17d3af020c87b.zip chromium_src-85c04ce437c3fd5253cb2468f4c17d3af020c87b.tar.gz chromium_src-85c04ce437c3fd5253cb2468f4c17d3af020c87b.tar.bz2 |
chromeos: Change all clients of UpdateLibrary to use UpdateEngineClient.
This is part 2 of the UpdateLibrary to UpdateEngineClient migration.
UpdateLibrary will be removed in the next patch.
BUG=chromium-os:16564
TEST=confirm that the update works as before from chrome://settings/about and OOBE screen.
Review URL: http://codereview.chromium.org/8585025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111190 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/upgrade_detector_chromeos.cc')
-rw-r--r-- | chrome/browser/chromeos/upgrade_detector_chromeos.cc | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/chrome/browser/chromeos/upgrade_detector_chromeos.cc b/chrome/browser/chromeos/upgrade_detector_chromeos.cc index 653c4bb..40d77fa 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(); |