Add header declarations in auto_updater
This commit is contained in:
parent
8cf00fece6
commit
919d7fa22e
2 changed files with 4 additions and 2 deletions
|
@ -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() {}
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue