Index: chrome/browser/chromeos/app_mode/startup_app_launcher.cc |
diff --git a/chrome/browser/chromeos/app_mode/startup_app_launcher.cc b/chrome/browser/chromeos/app_mode/startup_app_launcher.cc |
index 170d3527bd2021d72e920b52db6cef26857b1c3f..98343188fec93ef9a376aa26193e30430bf5c132 100644 |
--- a/chrome/browser/chromeos/app_mode/startup_app_launcher.cc |
+++ b/chrome/browser/chromeos/app_mode/startup_app_launcher.cc |
@@ -250,7 +250,7 @@ void StartupAppLauncher::BeginInstall() { |
<< net::NetworkChangeNotifier::GetConnectionType(); |
if (IsAppInstalled(profile_, app_id_)) { |
- EnsureSystemSaltIsLoaded(); |
+ OnReadyToLaunch(); |
return; |
} |
@@ -271,7 +271,7 @@ void StartupAppLauncher::InstallCallback(bool success, |
BrowserThread::PostTask( |
BrowserThread::UI, |
FROM_HERE, |
- base::Bind(&StartupAppLauncher::EnsureSystemSaltIsLoaded, |
+ base::Bind(&StartupAppLauncher::OnReadyToLaunch, |
AsWeakPtr())); |
return; |
} |
@@ -280,20 +280,7 @@ void StartupAppLauncher::InstallCallback(bool success, |
OnLaunchFailure(KioskAppLaunchError::UNABLE_TO_INSTALL); |
} |
-void StartupAppLauncher::EnsureSystemSaltIsLoaded() { |
- // Defer app launch until system salt is loaded to make sure that identity |
- // api works with the enterprise kiosk app. |
- SystemSaltGetter::Get()->GetSystemSalt( |
- base::Bind(&StartupAppLauncher::OnReadyToLaunch, AsWeakPtr())); |
-} |
- |
-void StartupAppLauncher::OnReadyToLaunch(const std::string& system_salt) { |
- if (system_salt.empty()) { |
- LOG(ERROR) << "Could not load system salt."; |
- OnLaunchFailure(KioskAppLaunchError::CRYPTOHOMED_NOT_RUNNING); |
- return; |
- } |
- |
+void StartupAppLauncher::OnReadyToLaunch() { |
ready_to_launch_ = true; |
FOR_EACH_OBSERVER(Observer, observer_list_, OnReadyToLaunch()); |
} |