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

Unified Diff: chrome/browser/chromeos/login/update_screen.cc

Issue 8588006: Eliminate CrosLibrary::EnsureLoaded (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 9 years, 1 month 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/chromeos/login/update_screen.cc
diff --git a/chrome/browser/chromeos/login/update_screen.cc b/chrome/browser/chromeos/login/update_screen.cc
index 15e389408964a66693fa136a6c7cb3a57a01e0e2..1958ad384e6cad8b76985390bd177e94e343f724 100644
--- a/chrome/browser/chromeos/login/update_screen.cc
+++ b/chrome/browser/chromeos/login/update_screen.cc
@@ -184,15 +184,10 @@ void UpdateScreen::UpdateStatusChanged(const UpdateLibrary::Status& status) {
}
void UpdateScreen::StartUpdate() {
- if (!CrosLibrary::Get()->EnsureLoaded()) {
- LOG(ERROR) << "Error loading CrosLibrary";
- ExitUpdate(REASON_UPDATE_INIT_FAILED);
- } else {
- CrosLibrary::Get()->GetUpdateLibrary()->AddObserver(this);
- VLOG(1) << "Initiate update check";
- CrosLibrary::Get()->GetUpdateLibrary()->RequestUpdateCheck(
- StartUpdateCallback, this);
- }
+ CrosLibrary::Get()->GetUpdateLibrary()->AddObserver(this);
+ VLOG(1) << "Initiate update check";
+ CrosLibrary::Get()->GetUpdateLibrary()->RequestUpdateCheck(
+ StartUpdateCallback, this);
}
void UpdateScreen::CancelUpdate() {
@@ -216,8 +211,7 @@ void UpdateScreen::PrepareToShow() {
}
void UpdateScreen::ExitUpdate(UpdateScreen::ExitReason reason) {
- if (CrosLibrary::Get()->EnsureLoaded())
- CrosLibrary::Get()->GetUpdateLibrary()->RemoveObserver(this);
+ CrosLibrary::Get()->GetUpdateLibrary()->RemoveObserver(this);
switch (reason) {
case REASON_UPDATE_CANCELED:
« no previous file with comments | « chrome/browser/chromeos/login/signed_settings.cc ('k') | chrome/browser/chromeos/login/update_screen_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698