diff --git a/atom/browser/auto_updater.h b/atom/browser/auto_updater.h index aa4ca19cf21f..f70ed986c5a3 100644 --- a/atom/browser/auto_updater.h +++ b/atom/browser/auto_updater.h @@ -22,6 +22,8 @@ class Delegate { // An error happened. virtual void OnError(const std::string& error) {} + virtual void OnError(const std::string& error, const int code, const std::string& domain) {} + // Checking to see if there is an update virtual void OnCheckingForUpdate() {} diff --git a/atom/browser/auto_updater_mac.mm b/atom/browser/auto_updater_mac.mm index 7527a6623bf2..26aa42fdb58e 100644 --- a/atom/browser/auto_updater_mac.mm +++ b/atom/browser/auto_updater_mac.mm @@ -115,7 +115,7 @@ void AutoUpdater::CheckForUpdates() { [failureString appendString:@" "]; [failureString appendString:error.localizedRecoverySuggestion]; } - delegate->OnError(base::SysNSStringToUTF8(failureString)); + delegate->OnError(base::SysNSStringToUTF8(failureString), error.code, base::SysNSStringToUTF8(error.domain)); }]; } @@ -124,7 +124,7 @@ void AutoUpdater::QuitAndInstall() { if (g_update_available) { [[g_updater relaunchToInstallUpdate] subscribeError:^(NSError* error) { if (delegate) - delegate->OnError(base::SysNSStringToUTF8(error.localizedDescription)); + delegate->OnError(base::SysNSStringToUTF8(error.localizedDescription), error.code, base::SysNSStringToUTF8(error.domain)); }]; } else { if (delegate)