From: Cheng Zhao Date: Mon, 3 Jun 2013 10:15:20 +0000 (+0800) Subject: willInstallUpdateOnQuit has been discarded in latest Sparkle. X-Git-Tag: v0.1.0~109 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=a918cd6b4ecfd653f478a20ae54bf348bebe14dc;p=electron.git willInstallUpdateOnQuit has been discarded in latest Sparkle. --- diff --git a/browser/auto_updater_mac.mm b/browser/auto_updater_mac.mm index 8837f538..eae85ffc 100644 --- a/browser/auto_updater_mac.mm +++ b/browser/auto_updater_mac.mm @@ -40,20 +40,20 @@ void CallNSInvocation(ScopedNSInvocation invocation) { @implementation SUUpdaterDelegate -- (void)updater:(SUUpdater*)updater - willInstallUpdateOnQuit:(SUAppcastItem*)update - immediateInstallationInvocation:(NSInvocation*)invocation { +- (BOOL)updater:(SUUpdater*)updater + shouldPostponeRelaunchForUpdate:(SUAppcastItem*)update + untilInvoking:(NSInvocation*)invocation { AutoUpdaterDelegate* delegate = auto_updater::AutoUpdater::GetDelegate(); - if (!delegate) { - [invocation invoke]; - return; - } + if (!delegate) + return NO; std::string version(base::SysNSStringToUTF8([update versionString])); ScopedNSInvocation invocation_ptr([invocation retain]); delegate->WillInstallUpdate( version, base::Bind(&CallNSInvocation, base::Passed(invocation_ptr.Pass()))); + + return YES; } @end